From 4998964a435fe0f02a2d81b01fdb837214674e72 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 30 Apr 2018 21:41:40 -0700 Subject: fixes #381 Want comparators for various types --- docs/man/nng_ctx.5.adoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docs/man/nng_ctx.5.adoc') 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) <>, <>, <>, +<>, <>, <>, <>, -- cgit v1.2.3-70-g09d2