Skip to content

Commit

Permalink
Update nng_ctx.5.adoc
Browse files Browse the repository at this point in the history
Fix typos in example.
  • Loading branch information
drbitboy authored and JaylinYu committed Mar 25, 2024
1 parent 2bc31f9 commit 96d1d49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/man/nng_ctx.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
----
Expand Down

0 comments on commit 96d1d49

Please sign in to comment.