nabto_client_stream_open()

DESCRIPTION

Handshake a stream. This function initializes and does a three way handshake on a stream.

DECLARATION

NABTO_CLIENT_DECL_PREFIX void NABTO_CLIENT_API
nabto_client_stream_open(NabtoClientStream* stream, NabtoClientFuture* future, uint32_t port)

PARAMETERS

stream:
[in] The stream to connect.
future:
[in] The future.
port:
[in] The listening id/port to use for the stream. This is used to distinguish streams in the other end, like a port number.

RETURN VALUES

A future when resolved the stream is either established or failed. Future status: NABTO_CLIENT_EC_OK if opening went ok. NABTO_CLIENT_EC_ABORTED if the stream could not be created, e.g. the handshake is aborted.

EXAMPLES

None.