aboutsummaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/nng_ctx.5.adoc10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/man/nng_ctx.5.adoc b/docs/man/nng_ctx.5.adoc
index c8ab62cd..63e8736c 100644
--- a/docs/man/nng_ctx.5.adoc
+++ b/docs/man/nng_ctx.5.adoc
@@ -141,17 +141,17 @@ or xref:nng_listen.3.adoc[`nng_listen()`].
----
#define CONCURRENCY 1024
-echo_context ecs[CONCURRENCY];
+static struct echo_context ecs[CONCURRENCY];
void
start_echo_service(nng_socket rep_socket)
{
for (int i = 0; i < CONCURRENCY; i++) {
// error checks elided for clarity
- nng_ctx_open(ec[i].ctx, rep_socket)
- nng_aio_alloc(ec[i].aio, echo, &e[i]);
- ec[i].state = INIT;
- echo(&ec[i]); // start it running
+ nng_ctx_open(&ecs[i].ctx, rep_socket);
+ nng_aio_alloc(&ecs[i].aio, echo, ecs+i);
+ ecs[i].state = INIT;
+ echo(ecs+i); // start it running
}
}
----