SwiftclassNetwork
NetworkChannel
class Network.NetworkChannel
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 76
- deinit
deinit - field
let channelLock: os.OSAllocatedUnfairLock<Network.NetworkChannel<A>.NeworkChannelLockedState> - field
let nw: Network.NWConnection?+0x10 - field
let nwGroup: Network.NWConnectionGroup?+0x18 - field
let readClosedNotifier: Network.ContinuationNotifier<()> - field
let readyNotifier: Network.ContinuationNotifier<()> - field
let writeClosedNotifier: Network.ContinuationNotifier<()> - func
cancel() -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.close(code: Network.NWProtocolWebSocket.CloseCode, reason: String?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
dataTransferReport() async throws -> Network.NWConnection.DataTransferReport - func
Network.NetworkChannel< where A: Network.OneToOneProtocol>.endActivity(Network.NWActivity) -> () - func
Network.NetworkChannel< where A: Network.MultiplexProtocol>.endActivity(Network.NWActivity) -> () - func
establishmentReport() async throws -> Network.NWConnection.EstablishmentReport - func
metadata(definition: Network.NWProtocolDefinition) -> Network.NWProtocolMetadata? - func
Network.NetworkChannel< where A == Network.QUICStream>.onBetterPathUpdate(@isolated(any) @Sendable (Self, Bool) -> ()) -> Self - func
Network.NetworkChannel< where A == Network.QUICStream>.onPathUpdate(@isolated(any) @Sendable (Self, Network.NWPath) -> ()) -> Self - func
Network.NetworkChannel< where A == Network.QUICStream>.onViabilityUpdate(@isolated(any) @Sendable (Self, Bool) -> ()) -> Self - func
Network.NetworkChannel< where A == Network.WebSocket>.ping<A where A1: Foundation.DataProtocol>(_: A1?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.pong<A where A1: Foundation.DataProtocol>(_: A1?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
receive<A where A == Network.Framer<A1>, A1: Network.FramerProtocol>() async throws -> (content: Foundation.Data, metadata: Network.Framer<A1>.Metadata) - func
receive<A, B, C where A == Network.Coder<A1, B1, C1>, A1: Encodable, B1: Decodable, C1: Network.NetworkCoder>() async throws -> (content: B1, metadata: Network.Coder<A1, B1, C1>.Metadata) - func
Network.NetworkChannel< where A == Network.QUICDatagram>.receive() async throws -> (content: Foundation.Data, metadata: Network.QUICDatagram.Metadata) - func
Network.NetworkChannel< where A: Network.StreamProtocol>.receive<A where A1: Network.NetworkFixedWidthInteger>(as: A1.Type) async throws -> (content: A1, metadata: A.Metadata) - func
Network.NetworkChannel< where A: Network.StreamProtocol>.receive(atLeast: Int, atMost: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.NetworkChannel< where A: Network.StreamProtocol>.receive(exactly: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.NetworkChannel< where A: Network.DatagramProtocol>.receive() async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.NetworkChannel< where A == Network.TLV>.receive() async throws -> (content: Foundation.Data, metadata: Network.TLV.Metadata) - func
Network.NetworkChannel< where A == Network.Datagram>.receive() async throws -> (content: Foundation.Data, metadata: Network.Datagram.Metadata) - func
Network.NetworkChannel< where A == Network.WebSocket>.receive() async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata) - func
receiveWithMetadata<A, B, C where A == Network.Coder<A1, B1, C1>, A1: Encodable, B1: Decodable, C1: Network.NetworkCoder>() async throws -> (content: B1, metadata: Network.Coder<A1, B1, C1>.Metadata) - func
Network.NetworkChannel< where A == Network.QUICDatagram>.receiveWithMetadata() async throws -> (content: Foundation.Data, metadata: Network.QUICDatagram.Metadata) - func
Network.NetworkChannel< where A: Network.StreamProtocol>.receiveWithMetadata(atLeast: Int, atMost: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.NetworkChannel< where A: Network.StreamProtocol>.receiveWithMetadata(exactly: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.NetworkChannel< where A: Network.DatagramProtocol>.receiveWithMetadata() async throws -> (content: Foundation.Data, metadata: A.Metadata) - func
Network.NetworkChannel< where A == Network.TLV>.receiveWithMetadata() async throws -> (content: Foundation.Data, metadata: Network.TLV.Metadata) - func
Network.NetworkChannel< where A == Network.Datagram>.receiveWithMetadata() async throws -> (content: Foundation.Data, metadata: Network.Datagram.Metadata) - func
Network.NetworkChannel< where A == Network.WebSocket>.receiveWithMetadata() async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata) - func
send<A where A == Network.Framer<A1>, A1: Network.FramerProtocol>(_: Foundation.Data, lastMessage: Bool, metadata: Network.NWProtocolFramer.Message?, other: () -> [Network.NWProtocolMetadata]) async throws -> () - func
send<A, B, C where A == Network.Coder<A1, B1, C1>, A1: Encodable, B1: Decodable, C1: Network.NetworkCoder>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A == Network.QUICDatagram>.send<A where A1: Foundation.DataProtocol>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A: Network.StreamProtocol>.send<A where A1: Foundation.DataProtocol>(_: A1, endOfStream: Bool, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A: Network.StreamProtocol>.send<A where A1: Network.NetworkFixedWidthInteger>(_: A1, endOfStream: Bool, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A: Network.DatagramProtocol>.send<A where A1: Foundation.DataProtocol>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A == Network.TLV>.send<A where A1: Foundation.DataProtocol>(_: A1, type: Int, lastMessage: Bool, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A == Network.Datagram>.send<A where A1: Foundation.DataProtocol>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.send(_: String, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.send<A where A1: Foundation.DataProtocol>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) async throws -> () - func
Network.NetworkChannel< where A: Network.StreamProtocol>.sendIdempotent<A where A1: Foundation.DataProtocol>(_: A1, endOfStream: Bool, metadata: () -> [Network.NWProtocolMetadata]) -> () - func
Network.NetworkChannel< where A: Network.StreamProtocol>.sendIdempotent<A where A1: Network.NetworkFixedWidthInteger>(_: A1, endOfStream: Bool, metadata: () -> [Network.NWProtocolMetadata]) -> () - func
Network.NetworkChannel< where A == Network.TLV>.sendIdempotent<A where A1: Foundation.DataProtocol>(_: A1, type: Int, lastMessage: Bool, metadata: () -> [Network.NWProtocolMetadata]) -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.sendIdempotent(_: String, metadata: () -> [Network.NWProtocolMetadata]) -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.sendIdempotent<A where A1: Foundation.DataProtocol>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) -> () - func
start(queue: OS_dispatch_queue) -> Self - func
Network.NetworkChannel< where A: Network.OneToOneProtocol>.startActivity(Network.NWActivity) -> () - func
Network.NetworkChannel< where A: Network.MultiplexProtocol>.startActivity(Network.NWActivity) -> () - func
startDataTransferReport() -> Network.NWConnection.PendingDataTransferReport - func
startIfNeeded(queue: OS_dispatch_queue) -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.startReceive(((Int, Int) async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata)) async throws -> ()) async throws -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.startSend(_: String, metadata: () -> [Network.NWProtocolMetadata], handler: ((String, Bool) async throws -> ()) async throws -> ()) async throws -> () - func
Network.NetworkChannel< where A == Network.WebSocket>.startSend<A where A1: Foundation.DataProtocol>(_: A1, metadata: () -> [Network.NWProtocolMetadata], handler: ((A1, Bool) async throws -> ()) async throws -> ()) async throws -> () - func
waitForReadClosed() async throws -> () - func
waitForWriteClosed() async throws -> () - typealias
typealias ApplicationProtocolType = A - typealias
typealias ID = Swift.String - var
var debugDescription: String { get } - var
var id: String { get } - var
var identifier: UInt64 { get } - var
var maximumDatagramSize: Int { get } - var
var messages: AsyncThrowingStream<(content: A.ContentType, metadata: A.Metadata), Error> { get } - var
var messagesWithMetadata: AsyncThrowingStream<(content: A.ContentType, metadata: A.Metadata), Error> { get } - var
var parameters: Network.NWParameters { get } - var
var queue: OS_dispatch_queue? { get } - var
var state: Network.NetworkChannel<A>.State { get } - var
var streamApplicationErrorCode: UInt64 { get set } - var
var streamID: UInt64 { get } - var
var underlyingConnection: Network.NWConnection? { get }
Header
class NetworkChannel<A> where A: Network.NetworkProtocolOptions { enum State { case waiting(Network.NWError) case failed(Network.NWError) case setup case preparing case ready case cancelled } struct NeworkChannelLockedState { 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 remoteEndpoint: Network.Endpoint? var parameters: Network.Parameters? } let nw: Network.NWConnection? let nwGroup: Network.NWConnectionGroup? let channelLock: os.OSAllocatedUnfairLock<Network.NetworkChannel<A>.NeworkChannelLockedState> let readyNotifier: Network.ContinuationNotifier<()> let readClosedNotifier: Network.ContinuationNotifier<()> let writeClosedNotifier: Network.ContinuationNotifier<()> var id: Swift.String { get } func start(queue: __C.OS_dispatch_queue) -> Self var debugDescription: Swift.String { get } var state: Network.NetworkChannel<A>.State { get } var maximumDatagramSize: Swift.Int { get } var parameters: Network.NWParameters { get } var identifier: Swift.UInt64 { get } var queue: __C.OS_dispatch_queue? { get } func cancel() func metadata(definition: Network.NWProtocolDefinition) -> Network.NWProtocolMetadata? var underlyingConnection: Network.NWConnection? { get } func establishmentReport() async throws -> Network.NWConnection.EstablishmentReport func dataTransferReport() async throws -> Network.NWConnection.DataTransferReport func startDataTransferReport() -> Network.NWConnection.PendingDataTransferReport func startIfNeeded(queue: __C.OS_dispatch_queue) func waitForReadClosed() async throws func waitForWriteClosed() async throws final func receiveWithMetadata<A1, B1, C1>() async throws -> (content: B1, metadata: Network.Coder<A1, B1, C1>.Metadata) where A == Network.Coder<A1, B1, C1>, A1: Swift.Encodable, B1: Swift.Decodable, C1: Network.NetworkCoder final func send<A1>(_: Foundation.Data, lastMessage: Swift.Bool, metadata: Network.NWProtocolFramer.Message?, other: () -> [Network.NWProtocolMetadata]) async throws where A == Network.Framer<A1>, A1: Network.FramerProtocol final func send<A1, B1, C1>(_: A1, metadata: () -> [Network.NWProtocolMetadata]) async throws where A == Network.Coder<A1, B1, C1>, A1: Swift.Encodable, B1: Swift.Decodable, C1: Network.NetworkCoder final func receive<A1>() async throws -> (content: Foundation.Data, metadata: Network.Framer<A1>.Metadata) where A == Network.Framer<A1>, A1: Network.FramerProtocol final func receive<A1, B1, C1>() async throws -> (content: B1, metadata: Network.Coder<A1, B1, C1>.Metadata) where A == Network.Coder<A1, B1, C1>, A1: Swift.Encodable, B1: Swift.Decodable, C1: Network.NetworkCoder deinit }