SwiftclassNetwork

class Network.Connection7

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

Members 36

  1. deinitdeinit
  2. fieldlet lock: os.OSAllocatedUnfairLock<Network.Connection7<A>.LockedState>
  3. fieldlet nw: Network.NWConnection?+0x10
  4. funcbetterPathUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Bool) -> ())?) -> Self
  5. funcclose< where A == Network.WebSocket>(code: Network.NWProtocolWebSocket.CloseCode, reason: String?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  6. funcpathUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Network.NWPath) -> ())?) -> Self
  7. funcping< where A == Network.WebSocket>(_: Foundation.Data?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  8. funcpong< where A == Network.WebSocket>(_: Foundation.Data?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  9. funcprependProtocols<A, B where A1: Network.OneToOneProtocol, B1: Network.NetworkProtocolOptions>(() -> (A1, repeat B1)) -> Network.Connection7<A1>
  10. funcreceive< where A == Network.TLV>() async throws -> (content: Foundation.Data, metadata: Network.TLV.Metadata)
  11. funcreceive< where A == Network.UDP>() async throws -> (content: Foundation.Data, metadata: Network.UDP.Metadata)
  12. funcreceive< where A == Network.Datagram>() async throws -> (content: Foundation.Data, metadata: Network.Datagram.Metadata)
  13. funcreceive< where A == Network.WebSocket>() async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata)
  14. funcNetwork.Connection7< where A: Network.StreamProtocol>.receive(atLeast: Int, atMost: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata)
  15. funcNetwork.Connection7< where A: Network.StreamProtocol>.receive(exactly: Int) async throws -> (content: Foundation.Data, metadata: A.Metadata)
  16. funcsend< where A == Network.TLV>(_: Foundation.Data, type: Int, lastMessage: Bool, options: Network.Connection7<Network.TLV>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  17. funcsend< where A == Network.WebSocket>(_: Foundation.Data, options: Network.Connection7<Network.WebSocket>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  18. funcsend< where A == Network.WebSocket>(_: String, options: Network.Connection7<Network.WebSocket>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  19. funcsend< where A == Network.UDP>(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  20. funcsend< where A == Network.Datagram>(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  21. funcNetwork.Connection7< where A: Network.StreamProtocol>.send(_: Foundation.Data, endOfStream: Bool, options: Network.Connection7<A>.SendOptions?, metadata: () -> [Network.NWProtocolMetadata]) async throws -> ()
  22. funcstartReceive< where A == Network.WebSocket>(((Int, Int) async throws -> (content: Foundation.Data, metadata: Network.WebSocket.Metadata)) async throws -> ()) async throws -> ()
  23. funcstartSend< where A == Network.WebSocket>(_: Foundation.Data, metadata: () -> [Network.NWProtocolMetadata], handler: ((Foundation.Data, Bool) async throws -> ()) async throws -> ()) async throws -> ()
  24. funcstartSend< where A == Network.WebSocket>(_: String, metadata: () -> [Network.NWProtocolMetadata], handler: ((String, Bool) async throws -> ()) async throws -> ()) async throws -> ()
  25. funcstateUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Network.NWConnection.State) -> ())?) -> Self
  26. funcviabilityUpdateHandler((@isolated(any) @Sendable (Network.Connection7<A>, Bool) -> ())?) -> Self
  27. initNetwork.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.NWEndpoint, using: Network.NWParametersBuilder<A, Pack{repeat A1}>) -> Network.Connection7<A>
  28. initNetwork.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.NWEndpoint, using: () -> (A, repeat A1)) -> Network.Connection7<A>
  29. initNetwork.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.Connectable, using: Network.NWParametersBuilder<A, Pack{repeat A1}>) -> Network.Connection7<A>
  30. initNetwork.Connection7.__allocating_init<A where A1: Network.NetworkProtocolOptions>(to: Network.Connectable, using: () -> (A, repeat A1)) -> Network.Connection7<A>
  31. initNetwork.Connection7.__allocating_init(using: Network.NWConnection, with: Network.NetworkCoder?) -> Network.Connection7<A>
  32. typealiastypealias ApplicationProtocolType = A
  33. typealiastypealias ID = Swift.String
  34. varvar messages: AsyncThrowingStream<(content: A.ContentType, metadata: A.Metadata), Error> { get }
  35. varvar streamApplicationErrorCode: UInt64 { get set }
  36. varvar streamID: UInt64 { get }
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
}