nabto_device_add_tcp_tunnel_service()

DESCRIPTION

Add a TCP tunnel service to the device. Can be invoked multiple times to add multiple services.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_add_tcp_tunnel_service(NabtoDevice* device,
                                    const char* serviceId,
                                    const char* serviceType,
                                    const char* host,
                                    uint16_t port)

PARAMETERS

device:
[in] The device instance to add TCP tunnel service on
serviceId:
[in] The unique id of the service.
serviceType:
[in] The type of the service, e.g. ssh, rtsp, http,...
host:
[in] The IPv4 address of the host to connect to e.g. "127.0.0.1"
port:
[in] Port number 22, 80, 554 etc

RETURN VALUES

NABTO_DEVICE_EC_OK iff the service was added. NABTO_DEVICE_EC_INVALID_ARGUMENT if the host could not be parsed as IPv4 NABTO_DEVICE_EC_OUT_OF_MEMORY if the underlying structure could not be allocated

EXAMPLES

None.