Enumeration

NWTCPConnectionState

Defined connection states. New types may be defined in the future.

Declaration

typedef enum NWTCPConnectionState : NSInteger {
    ...
} NWTCPConnectionState;

Topics

Enumeration Cases

NWTCPConnectionStateCancelled

The connection has been cancelled by the client calling cancel.

NWTCPConnectionStateConnected

The connection is established. It is now possible to transfer data. If TLS is in use, the TLS handshake has finished.

NWTCPConnectionStateConnecting

The connection is attempting to connect. This includes endpoint resolution when applicable.

NWTCPConnectionStateDisconnected

The connection is disconnected. It is no longer possible to transfer data. The application should call cancel to clean up resources.

NWTCPConnectionStateInvalid

The connection is in an invalid or uninitialized state.

NWTCPConnectionStateWaiting

The connection has attempted to connect but failed. It is now waiting for better conditions before trying again.

See Also

Monitoring the Connection Status

state

The status of the connection

viable

The viability of a TCP connection indicates whether or not data can be transferred

error

The connection-wide error property

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software