Contents

createTCPConnectionThroughTunnel(to:enableTLS:tlsParameters:delegate:)

Create a TCP connection through the current tunnel.

Declaration

func createTCPConnectionThroughTunnel(to remoteEndpoint: NWEndpoint, enableTLS: Bool, tlsParameters TLSParameters: NWTLSParameters?, delegate: Any?) -> NWTCPConnection

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 True 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