From 76023f05490e1ece0757a11dc209939f7091079d Mon Sep 17 00:00:00 2001 From: gdamore Date: Thu, 2 Jan 2025 08:10:52 +0000 Subject: deploy: c0b1557c7931b63435f9d340f5a290556a3cc59c --- ref/api/ctx.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ref/api/ctx.html') diff --git a/ref/api/ctx.html b/ref/api/ctx.html index 790efc27..9b0f1a6b 100644 --- a/ref/api/ctx.html +++ b/ref/api/ctx.html @@ -373,19 +373,20 @@ this function instead of nng_ctx_r int nng_ctx_get_int(nng_ctx ctx, const char *opt, int *valp); int nng_ctx_get_ms(nng_ctx ctx, const char *opt, nng_duration *valp); int nng_ctx_get_size(nng_ctx ctx, const char *opt, size_t *valp); -int nng_ctx_get_uint64(nng_ctx ctx, const char *opt, uint64_t *valp); int nng_ctx_set_bool(nng_ctx ctx, const char *opt, int val); int nng_ctx_set_int(nng_ctx ctx, const char *opt, int val); int nng_ctx_set_ms(nng_ctx ctx, const char *opt, nng_duration val); int nng_ctx_set_size(nng_ctx ctx, const char *opt, size_t val); -int nng_ctx_set_uint64(nng_ctx ctx, const char *opt, uint64_t val); +

Some protocols support certain options that affect the behavior of a specific context. +For example, most protocols will let you set the defaults timeouts associated with +send or receive separately for different contexts.

These functions are used to retrieve or change the value of an option named opt from the context ctx. -The nng_ctx_get_ functions retrieve the value, and store it in the location valp references. +The nng_ctx_get_ functions retrieve the value from ctx, and store it in the location valp references. The nng_ctx_set_ functions change the value for the ctx, taking it from val.

-

These functions access an option as a specific type. The protocol will have details about which options -are available for contexts, and which type they may be accessed using.

+

These functions access an option as a specific type. The protocol documentation will have details about which options +are available for contexts, whether they can be read or written, and the appropriate type to use.

Examples

These examples show building blocks for a concurrent service based on contexts.

Example 1: Context Echo Server

-- cgit v1.2.3-70-g09d2