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.

RETURNS

  • NABTO_CLIENT_EC_OK: if ok
  • NABTO_CLIENT_EC_INVALID_STATE: if the tunnel is not opened.