How to create multiple streams with custom ID? And how to pause/resume these streams? #339
-
Hello, I am reading the test client and trying to create a simple TRANSPORT alpn mode client program based on it. Right now I'm trying to understand how I can create multiple streams using a single quic conn. Looking at test client, to create a stream we do |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
stream id is sequential and is not designed to be controlled by users. otherwise it is vulnerable as many QUIC implementations might create those streams with stream_id lower than the current. some QUIC implementations might consider this as STREAM_LIMIT_ERROR connection error. for example, the peer defines MAX_BIDI_STREAMS as 100 and expects stream starts with stream_id 0, and user come up with a stream with stream_id 404, which exceeds 100 and the peer might close connection.
if you got nothing to send, do nothing when stream_write_notify callback triggers, when you get some data to send, try xqc_stream_send. if the send window is full, you can continue sending the remain data when …