summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
authorBrian Carcich <drbitboy@gmail.com>2024-03-16 17:54:43 -0400
committerGarrett D'Amore <garrett@damore.org>2024-03-16 15:00:47 -0700
commitf202eb5ff6f64ccb298d083cd41d1ba17d045336 (patch)
treecc0e1b927ba950b6a5da7cc7d612c9dbf9e64ee1 /docs/man
parent85fbe7f9e4642b554d0d97f2e3ff2aa12978691a (diff)
downloadnng-f202eb5ff6f64ccb298d083cd41d1ba17d045336.tar.gz
nng-f202eb5ff6f64ccb298d083cd41d1ba17d045336.tar.bz2
nng-f202eb5ff6f64ccb298d083cd41d1ba17d045336.zip
Update nng_ctx.5.adoc
Fix typos in example.
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
}
}
----