One Logo Pool Ball
Network · IOS API REFERENCE

TCP

struct · iOS 26.0+ · SDK 27.1

struct TCP

The system definition of the Transmission Control Protocol (TCP). Supports sending and receiving byte streams.

Members (13)

method · iOS 26.0+

ecnDisabled

TypeScript
ecnDisabled(disableECN: boolean): TCP
Swift declaration
func ecnDisabled(_ disableECN: Bool) -> TCP

Disable ECN negotiation. - Parameter disableECN: True to disable ECN, false otherwise.

method · iOS 26.0+

persistTimeout

TypeScript
persistTimeout(timeout: number): TCP
Swift declaration
func persistTimeout(_ timeout: UInt32) -> TCP

Set the TCP persist timeout. The TCP persist timeout, in seconds (`PERSIST_TIMEOUT`). See RFC 6429. - Parameter timeout: The persist timeout, in seconds.

method · iOS 26.0+

fastOpenAllowed

TypeScript
fastOpenAllowed(allowed: boolean): TCP
Swift declaration
func fastOpenAllowed(_ allowed: Bool) -> TCP

Configure TCP to enable TCP Fast Open (TFO). This may take effect even when TCP is not the top-level protocol in the protocol stack. For example, if TLS is running over TCP, the Client Hello message may be sent as fast open data. If TCP is the top-level protocol in the stack (the one the application directly interacts with), TFO will be disabled unless the application indicated that it will provide its own fast open data by calling NWParameters.allowFastOpen. - Parameter allowed: True to allow TFO, false otherwise.

method · iOS 26.0+

connectionTimeout

TypeScript
connectionTimeout(timeout: number): TCP
Swift declaration
func connectionTimeout(_ timeout: UInt32) -> TCP

Set the timeout for TCP connection establishment. A timeout for TCP connection establishment, in seconds. (`TCP_CONNECTIONTIMEOUT`). - Parameter timeout: The connection establishment timeout, in seconds.

method · iOS 26.0+

retransmitFinDrop

TypeScript
retransmitFinDrop(drop: boolean): TCP
Swift declaration
func retransmitFinDrop(_ drop: Bool) -> TCP

Configure TCP to drop the connection after a FIN does not receive an ACK. A boolean to cause TCP to drop its connection after not receiving an ACK after a FIN (`TCP_RXT_FINDROP`). - Parameter drop: True to drop, false otherwise.

method · iOS 26.0+

maximumSegmentSize

TypeScript
maximumSegmentSize(bytes: number): TCP
Swift declaration
func maximumSegmentSize(_ bytes: UInt32) -> TCP

Set maximum segment size. The maximum segment size in bytes (`TCP_MAXSEG`). - Parameter bytes: The maximum segment size in bytes.

method · iOS 26.0+

ackStretchingDisabled

TypeScript
ackStretchingDisabled(disableAckStretching: boolean): TCP
Swift declaration
func ackStretchingDisabled(_ disableAckStretching: Bool) -> TCP

Disable ACK stretching. A boolean to cause TCP to disable ACK stretching (`TCP_SENDMOREACKS`). - Parameter disableAckStretching: True to disable ACK stretching, false otherwise.

method · iOS 26.0+

retransmitConnectionDropTime

TypeScript
retransmitConnectionDropTime(timeout: number): TCP
Swift declaration
func retransmitConnectionDropTime(_ timeout: UInt32) -> TCP

Set the TCP retransmission attempt timeout. A timeout for TCP retransmission attempts, in seconds (`TCP_RXT_CONNDROPTIME`). - Parameter timeout: The retransmission attempt timeout, in seconds.

method · iOS 26.0+

noPush

TypeScript
noPush(noPush: boolean): TCP
Swift declaration
func noPush(_ noPush: Bool) -> TCP

Enable no-push mode. A boolean indicating that TCP should use no-push mode (`TCP_NOPUSH`). - Parameter noPush: True to use no-push mode, false otherwise.

method · iOS 26.0+

noDelay

TypeScript
noDelay(noDelay: boolean): TCP
Swift declaration
func noDelay(_ noDelay: Bool) -> TCP

Disable Nagle's algorithm. A boolean indicating that TCP should disable Nagle's algorithm (`TCP_NODELAY`). - Parameter noDelay: True to disable Nagle's algorithm, false otherwise.

method · iOS 26.0+

keepalive

TypeScript
keepalive(idleTimeInSeconds: number, count: number, intervalInSeconds: number): TCP
Swift declaration
func keepalive(idleTimeInSeconds: UInt32, count: UInt32, intervalInSeconds: UInt32) -> TCP

Enable TCP keepalives. - Parameter idleTimeInSeconds: The number of seconds of idleness to wait before keepalive probes are sent by TCP (`TCP_KEEPALIVE`). - Parameter count: The number of keepalive probes to send before terminating. - Parameter intervalInSeconds: The number of seconds of to wait before resending TCP keepalive probes (`TCP_KEEPINTVL`).

method · iOS 26.0+

noOptions

TypeScript
noOptions(noOptions: boolean): TCP
Swift declaration
func noOptions(_ noOptions: Bool) -> TCP

Enable no-options mode. A boolean indicating that TCP should use no-options mode (`TCP_NOOPT`). - Parameter noOptions: True to use no-options mode, false otherwise.

init · iOS 26.0+

init

TypeScript
static init(): TCP
Swift declaration
init()

Create an instance of TCP.

Skipped declarations

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

TCP.init(_:)

callback cannot propagate synchronous failure

All Network types →