Instance Method

createTCPConnectionThroughTunnelToEndpoint:enableTLS:TLSParameters:delegate:

Create a TCP connection through the current tunnel.

Declaration

- (NWTCPConnection *)createTCPConnectionThroughTunnelToEndpoint:(NWEndpoint *)remoteEndpoint enableTLS:(BOOL)enableTLS TLSParameters:(NWTLSParameters *)TLSParameters delegate:(id)delegate;

Parameters

remoteEndpoint

The remote endpoint to connect to.

enableTLS

A flag indicating if the TLS protocol should be used to secure the communication over the connection.

TLSParameters

The TLS protocol parameters to use. If enableTLS is YES and this parameter is nil then the default TLS parameters will be used.

delegate

An optional delegate object that conforms to the NWTCPConnectionAuthenticationDelegate protocol.

Discussion

Use this method to create a TCP connection to an endpoint inside the private network.

See Also

Creating Network Connections Through the Tunnel

- createUDPSessionThroughTunnelToEndpoint:fromEndpoint:

Create a UDP session through the current tunnel.