nabto_client_tcp_tunnel_get_local_port()

DESCRIPTION

Get the local port the tcp tunnel is bound to. If the port number 0 is used when creating the tunnel, this function is used to query what port was choosen.

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientError NABTO_CLIENT_API
nabto_client_tcp_tunnel_get_local_port(NabtoClientTcpTunnel* tunnel, uint16_t* localPort)

PARAMETERS

tunnel:
[in] The tunnel.
localPort:
[out] The port number.

RETURN VALUES

NABTO_CLIENT_EC_OK iff ok NABTO_CLIENT_EC_INVALID_STATE if the tunnel is not opened.

EXAMPLES

None.