SwiftclassNetwork
class Network.Connection7
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 36
- deinit
deinit - field
let lock: os.OSAllocatedUnfairLock<Network.Connection7<A>.LockedState> - field
let nw: Network.NWConnection?+0x10 - func
betterPathUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Bool) -> ())?) -> Self - func
close< where A == Network.WebSocket>(code: Network.NWProtocolWebSocket.CloseCode, reason: String?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
pathUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, 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
prependProtocols<A, B where A1: Network.OneToOneProtocol, B1: Network.NetworkProtocolOptions>(() -> (A1, repeat B1)) -> Network.Connection7<A1> - func
receive< where A == Network.TLV>() async throws -> (content: Foundation.Data, metadata: Network.TLV.Metadata) - func
receive< where A == Network.UDP>() async throws -> (content: Foundation.Data, metadata: Network.UDP.Metadata) - func
receive< where A == Network.Datagram>() async throws -> (content: Foundation.Data, metadata: Network.Datagram.Metadata) - func
receive< where A == Network.WebSocket>() async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata) - func
Network.Connection7< where A: Network.StreamProtocol>.receive(atLeast: Int, atMost: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.Connection7< where A: Network.StreamProtocol>.receive(exactly: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
send< where A == Network.TLV>(_: Foundation.Data, type: Int, lastMessage: Bool, options: Network.Connection7<Network.TLV>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
send< where A == Network.WebSocket>(_: Foundation.Data, options: Network.Connection7<Network.WebSocket>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
send< where A == Network.WebSocket>(_: String, options: Network.Connection7<Network.WebSocket>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
send< where A == Network.UDP>(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
send< where A == Network.Datagram>(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.Connection7< where A: Network.StreamProtocol>.send(_: Foundation.Data, endOfStream: Bool, options: Network.Connection7<A>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
startReceive< where A == Network.WebSocket>(((Int, Int) async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata)) async throws -> ()) async throws -> () - func
startSend< where A == Network.WebSocket>(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata], handler: ((Foundation.Data, Bool) async throws -> ()) async throws -> ()) async throws -> () - func
startSend< where A == Network.WebSocket>(_: String, metadata: () -> [Network.NWProtocolMetadata], handler: ((String, Bool) async throws -> ()) async throws -> ()) async throws -> () - func
stateUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Network.NWConnection.State) -> ())?) -> Self - func
viabilityUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Bool) -> ())?) -> Self - init
Network.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.NWEndpoint, using: Network.NWParametersBuilder<A, Pack{repeat A1}>) -> Network.Connection7<A> - init
Network.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.NWEndpoint, using: () -> (A, repeat A1)) -> Network.Connection7<A> - init
Network.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.Connectable, using: Network.NWParametersBuilder<A, Pack{repeat A1}>) -> Network.Connection7<A> - init
Network.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.Connectable, using: () -> (A, repeat A1)) -> Network.Connection7<A> - init
Network.Connection7.__allocating_init(using: Network.NWConnection, with: Network.NetworkCoder?) -> Network.Connection7<A> - typealias
typealias ApplicationProtocolType = A - typealias
typealias ID = Swift.String - var
var messages: AsyncThrowingStream<(content: A.ContentType, metadata: A.Metadata), Error> { get } - var
var streamApplicationErrorCode: UInt64 { get set } - var
var streamID: UInt64 { get }
Header
class Connection7<A> where A: Network.OneToOneProtocol { enum SendOptions { case idempotent } struct LockedState { var stateUpdateTask: Swift.Task<(), any Swift.Error>? var pathUpdateTask: Swift.Task<(), any Swift.Error>? var viabilityUpdateTask: Swift.Task<(), any Swift.Error>? var betterPathUpdateTask: Swift.Task<(), any Swift.Error>? var coder: (any Network.NetworkCoder)? var reconfigured: Swift.Bool } let nw: Network.NWConnection? let lock: os.OSAllocatedUnfairLock<Network.Connection7<A>.LockedState> init(using: Network.NWConnection, with: (any Network.NetworkCoder)?) init<each A1>(to: Network.NWEndpoint, using: Network.NWParametersBuilder<A, repeat (each A1)>) where repeat each A1: Network.NetworkProtocolOptions init<each A1>(to: Network.NWEndpoint, using: () -> (A, repeat (each A1))) where repeat each A1: Network.NetworkProtocolOptions init<each A1>(to: any Network.Connectable, using: Network.NWParametersBuilder<A, repeat (each A1)>) where repeat each A1: Network.NetworkProtocolOptions init<each A1>(to: any Network.Connectable, using: () -> (A, repeat (each A1))) where repeat each A1: Network.NetworkProtocolOptions final func startReceive(_: (_: (Swift.Int, Swift.Int) async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata)) async throws -> ()) async throws where A == Network.WebSocket final func prependProtocols<A1, each B1>(_: () -> (A1, repeat (each B1))) -> Network.Connection7<A1> where A1: Network.OneToOneProtocol, repeat each B1: Network.NetworkProtocolOptions final func pathUpdateHandler(_: (@isolated(any) @Sendable (Network.Connection7<A>, Network.NWPath) -> ())?) -> Self final func stateUpdateHandler(_: (@isolated(any) @Sendable (Network.Connection7<A>, Network.NWConnection.State) -> ())?) -> Self final func viabilityUpdateHandler(_: (@isolated(any) @Sendable (Network.Connection7<A>, Swift.Bool) -> ())?) -> Self final func betterPathUpdateHandler(_: (@isolated(any) @Sendable (Network.Connection7<A>, 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(_: Foundation.Data, type: Swift.Int, lastMessage: Swift.Bool, options: Network.Connection7<Network.TLV>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws where A == Network.TLV final func send(_: Foundation.Data, options: Network.Connection7<Network.WebSocket>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws where A == Network.WebSocket final func send(_: Swift.String, options: Network.Connection7<Network.WebSocket>.SendOptions?, 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(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata]) async throws where A == Network.Datagram 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.TLV.Metadata) where A == Network.TLV final func receive() async throws -> (content: Foundation.Data, metadata: Network.UDP.Metadata) where A == Network.UDP final func receive() async throws -> (content: Foundation.Data, metadata: Network.Datagram.Metadata) where A == Network.Datagram final func receive() async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata) where A == Network.WebSocket final func startSend(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata], handler: (_: (Foundation.Data, Swift.Bool) async throws -> ()) async throws -> ()) async throws where A == Network.WebSocket final func startSend(_: Swift.String, metadata: () -> [Network.NWProtocolMetadata], handler: (_: (Swift.String, Swift.Bool) async throws -> ()) async throws -> ()) async throws where A == Network.WebSocket deinit }