Skip to content

Commit ec685b3

Browse files
authored
Add the HTTP/2 connection (#1859)
Motivation: To build up a subchannel we need the notion of a connection to a backend as a building block. The connection provides a single HTTP/2 connection to the remote peer and doesn't deal with backoff or reconnects. Modifications: - Add the 'Connection' object which provides multiplexed streams to a connected backend - Add a 'connector' API which provides a NIO channel and a multiplexer on which streams can be created - Add test Utilities and tests Result: Can create a connection to a backend and run streams on it.
1 parent bdb7458 commit ec685b3

File tree

11 files changed

+1209
-4
lines changed

11 files changed

+1209
-4
lines changed

Sources/GRPCHTTP2Core/Client/Connection/ClientConnectionHandler.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import NIOCore
1818
import NIOHTTP2
1919

2020
/// An event which happens on a client's HTTP/2 connection.
21-
enum ClientConnectionEvent: Sendable, Hashable {
22-
enum CloseReason: Sendable, Hashable {
21+
@_spi(Package)
22+
public enum ClientConnectionEvent: Sendable, Hashable {
23+
public enum CloseReason: Sendable, Hashable {
2324
/// The server sent a GOAWAY frame to the client.
2425
case goAway(HTTP2ErrorCode, String)
2526
/// The keep alive timer fired and subsequently timed out.

0 commit comments

Comments
 (0)