From 0ea2fdfcab92d273f4db8bd4d24bb2639763155c Mon Sep 17 00:00:00 2001
From: gdamore
typedef struct nng_stream nng_stream`
+typedef struct nng_stream nng_stream
The base nng_stream type represents a bidirectional, byte-oriented, reliable connection.
@@ -245,7 +245,7 @@ using these Streams APIs.
The nng_stream object is used for raw byte stream connections, and
should not be confused with a pipe object created on a socket using
-the [nng_listen], [nng_dial] or related functions.
+the nng_listen, nng_dial or related functions.
Sending and Receiving Data
void nng_stream_send(nng_stream *s, nng_aio *aio);
@@ -289,6 +289,28 @@ stream itself.
or be aborted, these functions are unsafe to call from functions that may not block, such as the
completion function registered with an nng_aio when it is created.
+Getting Stream Options
+int nng_stream_get_bool(nng_stream *s, const char *opt, bool *valp);
+int nng_stream_get_int(nng_stream *s, const char *opt, int *valp);
+int nng_stream_get_ms(nng_stream *s, const char *opt, nng_duration *valp);
+int nng_stream_get_size(nng_stream *s, const char *opt, size_t *valp);
+int nng_stream_get_addr(nng_stream *s, const char *opt, nng_sockaddr *valp);
+int nng_stream_get_string(nng_stream *s, const char *opt, char **valp);
+int nng_stream_get_uint64(nng_stream *s, const char *opt, uint64_t *valp);
+
+
+
+
+
+
+
+
+These functions are used to obtain value of an option named opt from the stream s, and store it in the location
+referenced by valp.
+These functions access an option as a specific type. The transport layer will have details about which options
+are available, and which type they may be accessed using.
+In the case of nng_stream_get_string, the string is created as if by nng_strdup, and must be freed by
+the caller using nng_strfree when no longer needed.
--
cgit v1.2.3-70-g09d2