Oddbean new post about | logout
 nope, it's raw

you have to manage your own pings, it's in the spec but you have to handle making and receiving them and timing out connections

oh yeah, they can manage configurable compression options, that's automated, i don't think there is very much other than this 
 https://datatracker.ietf.org/doc/html/rfc6455

i'm gonna sit and read this, and i think you should too, because we use this all day long 
  Conceptually, WebSocket is really just a layer on top of TCP that
   does the following:

   o  adds a web origin-based security model for browsers

   o  adds an addressing and protocol naming mechanism to support
      multiple services on one port and multiple host names on one IP
      address

   o  layers a framing mechanism on top of TCP to get back to the IP
      packet mechanism that TCP is built on, but without length limits

   o  includes an additional closing handshake in-band that is designed
      to work in the presence of proxies and other intermediaries
 
 https://datatracker.ietf.org/doc/rfc9220/

this might be interesting too... it's basically reworking websockets to work over QUIC transports (which is UDP @ChipTuner @Michael J  ) 
 yeah, it's basically the same as TCP except, mostly, the rigmerole of handshake and disconnect, and that you can send either binary or text frames, everything else is optional... maintaining a ping to detect loss of connection is application level, but conventional 
 yes, and there is a framing scheme for text vs binary 
 Thanks for this!  Gonna give it a read. 
 there is a version for QUIC/HTTP/3 https://www.rfc-editor.org/rfc/rfc9220.html

one big difference is that http/3 has built in scheme for multiplexing connections so this is quite cool for nostr as it means you could auth on one stream and bind it to the multiplexed connection and not need to auth for each stream - most clients start up multiple sockets, 2 or 3 at least often sit open for an hour or more if you walk away