Closed Tiger-I-Yang closed 1 year ago
What is a message?
by messages I mean each byte slice that is used to call the webtransport.SendStream.Write() method is a message.
QUIC streams are byte streams. There's no such thing as messages, and there are no guarantees whatsoever how byte slices passed to Write
might be split.
so each time I call webtransport.SendStream.Write(), it's not sending the byte slice immediately but instead adding it to an internal buffer to be packetized as the transport sees fit? I thought every time I call the method, I'm sending a discrete chunk of data
for context, I'm sending compressed video frames, where the points where one frame ends and another begins is important.
QUIC makes no such guarantees.
got it
I noticed that when sending messages via streams from a Golang server to a browser client, sometimes the message arrives whole, while other times the browser receives a collection of smaller messages instead. In these cases, the smaller messages combined seem to form the message I intended to send.
What's going on here? is this behavior intended? and if so, can we have it so that the browser withholds the messages until it fully arrives.