createTCPConnection(_:)
Create a new TCP connection over the network associated with the command.
Declaration
func createTCPConnection(_ endpoint: NWEndpoint) -> NWTCPConnectionParameters
- endpoint:
The remote host and port of the connection.
Return Value
A TCP connection that will connect over the network associated with the command.
Discussion
The TCP connection is started automatically. Use KVO to observe the connection’s state property to be notified when the connection is established or fails.