commit | 335e56f7c751a21dc7d2ce74062ca522461802f1 | [log] [tgz] |
---|---|---|
author | QUICHE team <quiche-dev@google.com> | Mon Jul 29 15:06:31 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jul 30 11:03:11 2019 -0700 |
tree | 51f21da8d0ca289d2de6fdca39b50a13a6394f12 | |
parent | 687c6e70eaab87169f1623e8cc0f7273ef041c52 [diff] |
Create a QuartcMultiplexer which separates streams and datagrams into channels. QuartcMultiplexer effectively reorganizes the calls and callbacks for QuartcSession into three categories: - Per-channel send events - Per-channel receive events - Session-wide events that are not multiplexed QuartcMultiplexer works at a low level to hide streams and messages from other senders and receivers. It consists of a core multiplexer object which interacts with the QuartcEndpoint/Session, a channel sender which handles outgoing data, and a channel receiver which handles incoming data. The sender has a specific channel id, specified on creation. A channel writes this channel id in a varint form at the start of each new stream or datagram it sends. The multiplexer intercepts all the callbacks for incoming streams and datagrams. It reads a varint from the start of each stream or datagram to identify the channel id. It then looks up a receiver for that channel and delegates the stream or datagram to that receiver. A default receiver may be registered to handle all streams or datagrams not assigned to a specific receiver. This allows endpoints to dispatch unhandled data to a catch-all, or to await incoming data before registering a specific receiver. The latter may be useful to in conjunction with some forms of negotiation; eg. when certain ranges of channel ids are allocated to different protocols, but it is unknown which protocol will be used at startup. gfe-relnote: n/a (quartc only) PiperOrigin-RevId: 260588723 Change-Id: I4a3b815b48c4f825c47bc60b0b3fd76d4e3614a5
QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.
The code is currently in process of being moved from https://cs.chromium.org/chromium/src/net/third_party/ into this repository. Please excuse our appearance while we're under construction.