SwiftclassNetwork
class Network.Connection3
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolNetwork.ConnectionProtocol
- protocolSwift.Equatable
- protocolSwift.Hashable
- protocolSwift.Identifiable
Members 28
- deinit
deinit - field
let nw: Network.NWConnection?+0x10 - func
betterPathUpdateHandler(@Sendable (Network.Connection3<A, Pack{repeat B}>, Bool) -> ()) -> Self - func
close< where A == Network.WebSocket>(code: Network.NWProtocolWebSocket.CloseCode, reason: String?, metadata: [Network.NWProtocolMetadata]) async throws -> () - func
pathUpdateHandler(@Sendable (Network.Connection3<A, Pack{repeat B}>, Network.NWPath) -> ()) -> Self - func
ping< where A == Network.WebSocket>(_: Foundation.Data?, metadata: [Network.NWProtocolMetadata]) async throws -> () - func
pong< where A == Network.WebSocket>(_: Foundation.Data?, metadata: [Network.NWProtocolMetadata]) async throws -> () - func
receive< where A == Network.UDP>() async throws -> (content: Foundation.Data, metadata: [Network.NWProtocolMetadata]?) - func
receive< where A == Network.WebSocket>() async throws -> (type: Network.NWProtocolWebSocket.Opcode, content: Foundation.Data, metadata: [Network.NWProtocolMetadata]?, isFinal: Bool) - func
receive< where A == Network.TLV>() async throws -> (type: Int, content: Foundation.Data, metadata: [Network.NWProtocolMetadata]?, isFinal: Bool) - func
Network.Connection3< where A: Network.StreamProtocol>.receive(minimumLength: Int, maximumLength: Int) async throws -> (content: Foundation.Data, metadata: (endOfStream: Bool, other: [Network.NWProtocolMetadata]?)) - func
Network.Connection3< where A: Network.StreamProtocol>.receive(exactly: Int) async throws -> (content: Foundation.Data, metadata: (endOfStream: Bool, other: [Network.NWProtocolMetadata]?)) - func
Network.Connection3< where A: Network.MessageProtocol>.receive<A where A == Network.PropertyList3<A1>, A1: Decodable, A1: Encodable>() async throws -> (content: A1, metadata: [Network.NWProtocolMetadata]?, isFinal: Bool) - func
Network.Connection3< where A: Network.MessageProtocol>.receive<A where A == Network.JSON<A1>, A1: Decodable, A1: Encodable>() async throws -> (content: A1, metadata: [Network.NWProtocolMetadata]?, isFinal: Bool) - func
send< where A == Network.TLV>(type: UInt32, _: Foundation.Data, metadata: [Network.NWProtocolMetadata], isFinal: Bool) async throws -> () - func
send< where A == Network.WebSocket>(_: Foundation.Data?, metadata: [Network.NWProtocolMetadata]) async throws -> () - func
send< where A == Network.UDP>(_: Foundation.Data, metadata: [Network.NWProtocolMetadata]?) async throws -> () - func
send< where A == Network.WebSocket>(_: String?, metadata: [Network.NWProtocolMetadata]) async throws -> () - func
Network.Connection3< where A: Network.StreamProtocol>.send(_: Foundation.Data, metadata: [Network.NWProtocolMetadata]?, isComplete: Bool) async throws -> () - func
Network.Connection3< where A: Network.MessageProtocol>.send<A where A == Network.PropertyList3<A1>, A1: Decodable, A1: Encodable>(_: A1, metadata: [Network.NWProtocolMetadata], isFinal: Bool) async throws -> () - func
Network.Connection3< where A: Network.MessageProtocol>.send<A where A == Network.JSON<A1>, A1: Decodable, A1: Encodable>(_: A1, metadata: [Network.NWProtocolMetadata], isFinal: Bool) async throws -> () - func
stateUpdateHandler(@Sendable (Network.Connection3<A, Pack{repeat B}>, Network.NWConnection.State) -> ()) -> Self - func
viabilityUpdateHandler(@Sendable (Network.Connection3<A, Pack{repeat B}>, Bool) -> ()) -> Self - init
Network.Connection3.__allocating_init(to: Network.NWEndpoint, using: Network.Configuration<A, Pack{repeat B}>) -> Network.Connection3<A, Pack{repeat B}> - init
Network.Connection3.__allocating_init(using: Network.NWConnection) -> Network.Connection3<A, Pack{repeat B}> - typealias
typealias ApplicationProtocolType = A - typealias
typealias ID = Swift.String - var
var messages: AsyncThrowingStream<A.LegacyMessage, Error> { get }
Header
class Connection3<A, each B> where A: Network.NetworkProtocolOptions, repeat each B: Network.NetworkProtocolOptions { let nw: Network.NWConnection? init(to: Network.NWEndpoint, using: Network.Configuration<A, repeat (each B)>) init(using: Network.NWConnection) final func pathUpdateHandler(_: @escaping @Sendable (Network.Connection3<A, repeat (each B)>, Network.NWPath) -> ()) -> Self final func stateUpdateHandler(_: @escaping @Sendable (Network.Connection3<A, repeat (each B)>, Network.NWConnection.State) -> ()) -> Self final func viabilityUpdateHandler(_: @escaping @Sendable (Network.Connection3<A, repeat (each B)>, Swift.Bool) -> ()) -> Self final func betterPathUpdateHandler(_: @escaping @Sendable (Network.Connection3<A, repeat (each B)>, Swift.Bool) -> ()) -> Self final func ping(_: Foundation.Data?, metadata: [Network.NWProtocolMetadata]) async throws where A == Network.WebSocket final func pong(_: Foundation.Data?, metadata: [Network.NWProtocolMetadata]) async throws where A == Network.WebSocket final func send(type: Swift.UInt32, _: Foundation.Data, metadata: [Network.NWProtocolMetadata], isFinal: Swift.Bool) async throws where A == Network.TLV final func send(_: Foundation.Data?, metadata: [Network.NWProtocolMetadata]) async throws where A == Network.WebSocket final func send(_: Foundation.Data, metadata: [Network.NWProtocolMetadata]?) async throws where A == Network.UDP final func send(_: Swift.String?, metadata: [Network.NWProtocolMetadata]) async throws where A == Network.WebSocket final func close(code: Network.NWProtocolWebSocket.CloseCode, reason: Swift.String?, metadata: [Network.NWProtocolMetadata]) async throws where A == Network.WebSocket final func receive() async throws -> (content: Foundation.Data, metadata: [Network.NWProtocolMetadata]?) where A == Network.UDP final func receive() async throws -> (type: Network.NWProtocolWebSocket.Opcode, content: Foundation.Data, metadata: [Network.NWProtocolMetadata]?, isFinal: Swift.Bool) where A == Network.WebSocket final func receive() async throws -> (type: Swift.Int, content: Foundation.Data, metadata: [Network.NWProtocolMetadata]?, isFinal: Swift.Bool) where A == Network.TLV deinit }