diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-30 21:41:40 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-05-01 12:27:19 -0700 |
| commit | 4998964a435fe0f02a2d81b01fdb837214674e72 (patch) | |
| tree | dc5fe29da0574fc1510ab6f9b23b54ffd68cd97b /docs/man/nng_ctx.5.adoc | |
| parent | 63bdb2c28bc185096e579d1922d57cb71ecaa36b (diff) | |
| download | nng-4998964a435fe0f02a2d81b01fdb837214674e72.tar.gz nng-4998964a435fe0f02a2d81b01fdb837214674e72.tar.bz2 nng-4998964a435fe0f02a2d81b01fdb837214674e72.zip | |
fixes #381 Want comparators for various types
Diffstat (limited to 'docs/man/nng_ctx.5.adoc')
| -rw-r--r-- | docs/man/nng_ctx.5.adoc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/man/nng_ctx.5.adoc b/docs/man/nng_ctx.5.adoc index 98402738..ada117c3 100644 --- a/docs/man/nng_ctx.5.adoc +++ b/docs/man/nng_ctx.5.adoc @@ -81,6 +81,12 @@ are in use on the same socket is not supported, and may lead to unpredictable behavior. These asynchronous methods should not be mixed on the same socket. +[[NNG_CTX_INITIALIZER]] +=== Initialization + +A context may be initialized using the macro `NNG_CTX_INITIALIZER` +before it is opened, to prevent confusion with valid open contexts. + == EXAMPLE The following program fragment demonstrates the use of contexts to implement @@ -91,7 +97,7 @@ to the sender. ---- struct echo_context { - nng_ctx *ctx; + nng_ctx ctx; nng_aio *aio; enum { INIT, RECV, SEND } state; }; @@ -156,6 +162,7 @@ start_echo_service(nng_socket rep_socket) <<nng_ctx_close.3#,nng_ctx_close(3)>>, <<nng_ctx_open.3#,nng_ctx_open(3)>>, <<nng_ctx_getopt.3#,nng_ctx_getopt(3)>>, +<<nng_ctx_id.3#,nng_ctx_id(3)>>, <<nng_ctx_recv.3#,nng_ctx_recv(3)>>, <<nng_ctx_send.3#,nng_ctx_send(3)>>, <<nng_ctx_setopt.3#,nng_ctx_setopt(3)>>, |
