One Logo Pool Ball
NetworkExtension · IOS API REFERENCE

NWTCPConnection

class · iOS 9.0+ · Deprecated in iOS 18.0 · SDK 27.1

class NWTCPConnection

Members (15)

method · iOS 9.0+ · Deprecated in iOS 18.0

cancel

TypeScript
cancel(): void
Swift declaration
func cancel()
init · iOS 9.0+ · Deprecated in iOS 18.0

init

TypeScript
static init(connection: NWTCPConnection): NWTCPConnection
Swift declaration
init(upgradeFor connection: NWTCPConnection)
method · iOS 9.0+ · Deprecated in iOS 18.0

readLength

TypeScript
readLength(length: number, completion: ((arg0: (ArrayBuffer) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func readLength(_ length: Int, completionHandler completion: @escaping (Data?, (any Error)?) -> Void)
method · iOS 9.0+ · Deprecated in iOS 18.0

readMinimumLength

TypeScript
readMinimumLength(minimum: number, maximum: number, completion: ((arg0: (ArrayBuffer) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func readMinimumLength(_ minimum: Int, maximumLength maximum: Int, completionHandler completion: @escaping (Data?, (any Error)?) -> Void)
method · iOS 9.0+ · Deprecated in iOS 18.0

write

TypeScript
write(data: ArrayBuffer, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func write(_ data: Data, completionHandler completion: @escaping ((any Error)?) -> Void)
method · iOS 9.0+ · Deprecated in iOS 18.0

writeClose

TypeScript
writeClose(): void
Swift declaration
func writeClose()
get · iOS 9.0+ · Deprecated in iOS 18.0

connectedPath

TypeScript
get connectedPath(): (NWPath) | null
Swift declaration
var connectedPath: NWPath? { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

endpoint

TypeScript
get endpoint(): NWEndpoint
Swift declaration
var endpoint: NWEndpoint { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

error

TypeScript
get error(): (NativeError) | null
Swift declaration
var error: (any Error)? { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

hasBetterPath

TypeScript
get hasBetterPath(): boolean
Swift declaration
var hasBetterPath: Bool { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

localAddress

TypeScript
get localAddress(): (NWEndpoint) | null
Swift declaration
var localAddress: NWEndpoint? { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

remoteAddress

TypeScript
get remoteAddress(): (NWEndpoint) | null
Swift declaration
var remoteAddress: NWEndpoint? { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

state

TypeScript
get state(): NWTCPConnectionState
Swift declaration
var state: NWTCPConnectionState { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

txtRecord

TypeScript
get txtRecord(): (ArrayBuffer) | null
Swift declaration
var txtRecord: Data? { get }
get · iOS 9.0+ · Deprecated in iOS 18.0

isViable

TypeScript
get isViable(): boolean
Swift declaration
var isViable: Bool { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NWTCPConnection.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

All NetworkExtension types →