Live data from Hacker News

Ultrafast single TCP packet audio/visual experience

github.com

51–60 of 79 posts

Re: Ultrafast single TCP packet audio/visual experience

#53
Response headers:

   HTTP/1.1 200 k
   Content-Length: 1163
   content-encoding: deflate
I guess the '200 k' instead of '200 OK' saves an extra byte! :)

However, since they don't do any HTTP keep-alives (the connection sends a HTTP response and closes before you even send it anything), couldn't they save some space by dropping the Content-Length? It's an optional header.

Re: Ultrafast single TCP packet audio/visual experience

#55

Earlier quoted context omitted.

This would be really great without the audio. Due to the sound of the audio my initial reaction is to be fascinated, followed immediately by discomfort.

Over the last 5 years I've learnt to set the default sound level on my computer to "mute"

one settings I'd like to have is "unmute for the next 15 minutes" to be able to hear a funny vid without forgetting to reset it back to muted

Re: Ultrafast single TCP packet audio/visual experience

#56

For those you are wondering, this is a webserver that serves an HTML page in a single TCP packet. I guess ≤ 1500 bytes to avoid fragmentation - shows as 1.1KB in Chrome's network view. The HTML contains embedded JavaScript that runs a simple demo with animated ASCII and playing a LOUD changing audio tone. You can visit the demonstration website here: http://packet.city/ You can see a screenshot of the demo here: http…

The limit is 1460 - the IP and TCP headers occupy 40 bytes. Out of those another 63 are consumed by the HTTP headers. The full TCP payload is only 1226 bytes though, and the full HTTP payload 1163 bytes. The decoded HTML document is 1546 bytes.

IP header has flexible size, up to 60 bytes: https://networkengineering.stackexchange.com/questions/6855/...

Re: Ultrafast single TCP packet audio/visual experience

#57
post #49

Earlier quoted context omitted.

>"Out of those another 63 are consumed by the HTTP headers" I am curious how you ended up at 63 for that, can you elaborate?

Viewed the http headers and counted? Which you can do with curl, Chrome/Safari/FF dev tools, and lots of other tools besides.

Sure I know how to view them. I guess the commenter meant the HTTP headers for just this site were 63 bytes. I thought they were speaking on average like they were for 40 bytes for TCP/IP headers.

Re: Ultrafast single TCP packet audio/visual experience

#58

Earlier quoted context omitted.

The limit is 1460 - the IP and TCP headers occupy 40 bytes. Out of those another 63 are consumed by the HTTP headers. The full TCP payload is only 1226 bytes though, and the full HTTP payload 1163 bytes. The decoded HTML document is 1546 bytes.

IP header has flexible size, up to 60 bytes: https://networkengineering.stackexchange.com/questions/6855/...

Sure but on the actual internet how often are IP headers larger than 20 bytes because options are turned on? Not very often. The 20 bytes each for TCP and IPv4 is a pretty good assumption.

From the paper "IP Options are not an option" which is good quick read:

"We have studied the dependability of IP options-enabled network packets in the Internet. We found that overall, approximately half of Internet paths drop packets with options"[1]

[1] https://www2.eecs.berkeley.edu/Pubs/TechRpts/2005/EECS-2005-...

Post reply on HN