Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Client support for incoming messages and disconnections
The original assumption was that clients would communicate with servers exclusively using bidirectional streams initiated by the client. This was thought to be the only way to ensure that clients did not have to be reachable or able to serve incoming connections. However, QUIC allows any side of a connection to initiate streams, meaning that a client-initiated connection could still receive incoming streams from the server. The API as it stood did not support this, since we would not give callers of `new_client` any way of receiving messages sent to clients in this way. Ultimately, the only technical limitation of clients is that they are unable to handle incoming *connections* (and thus do not need to be reachable or have server configuration), so the `new_client` function now returns `IncomingMessages` and `DisconnectionEvents` since these remain applicable. BREAKING CHANGE: The signature of `Endpoint::new_client` has changed to return a tuple of `(Endpoint, IncomingMessages, DisconnectionEvents)` rather than just the `Endpoint`.
- Loading branch information