-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I tried adding version negotiation using the type exchange when accepting a stream, but there's no easy way to reject a stream due to a version mismatch.
The client's accept() call returns before the server has actually accepted the stream, and there's no way for the server to do anything with the Incoming type other than accept it -- but if we can't establish that we are on a compatible protocol version, how are we supposed to respond? The only way to respond is to use the type that we know is incompatible based on the exchange we just did.
Ideally the client's accept() call wouldn't return until the server has actually accepted the stream, and Fabruic would either use any built-in version mismatch errors possible, or it would have one extra bit of exchanged data before switching into the final mode of payload streaming.
I don't know if that impacts the underlying QUIC protocol -- ie, if I sent a payload on the sender before the server accepted the stream, is QUIC already sending those packets or are they being held by fabruic/quinn until the stream is accepted?
The last bit of feedback is that I personally find r# identifiers horrible -- I'd much prefer this to be renamed way from type rather than embracing r#type. Kind tends to be the usual suggestion.