Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nng_ctx.5.adoc #1797

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading