Closed szguoxz closed 1 year ago
Streams are very cheap. Depending on what exactly you're tunneling, you might also want to consider using datagrams. Sending multiple packets in a row on a single stream will expose them to head-of-line blocking, which may or may not be a problem for you depending on what you're tunneling.
Streams are very cheap. Depending on what exactly you're tunneling, you might also want to consider using datagrams. Sending multiple packets in a row on a single stream will expose them to head-of-line blocking, which may or may not be a problem for you depending on what you're tunneling.
Hi, @Ralith, By using datagrams, does it mean I have to handle packet reordering and packet retransmitting myself like using UDP?
Hi, @Ralith, By using datagrams, does it mean I have to handle packet reordering and packet retransmitting myself like using UDP?
Yes.
Closing as the question appears to have been answered.
I am trying to build a tunnel. I open a unistream, send the packet, and close the stream, then wait for the next packet. Is this too abusive? or should I open a stream, keep it alive, sending all the packets? will it be faster?