Contents

state

The status of the connection.

Declaration

var state: NWTCPConnectionState { get }

Discussion

Use Key-Value Observing (KVO) to monitor the state. Many methods, such as reading and writing on the connection, are only valid when the state is NWTCPConnectionStateConnected. For information about KVO, see Key-Value Observing Programming Guide.

See Also

Monitoring the connection status