diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-04 13:36:54 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-04-10 15:40:00 -0700 |
| commit | 5f7289e1f8e1427c9214c8e3e96ad56b1f868d53 (patch) | |
| tree | 39debf4ecde234b2a0be19c9cb15628cc32c2edb /docs/man/libnng.3.adoc | |
| parent | 56f1bf30e61c53646dd2f8425da7c7fa0d97b3e1 (diff) | |
| download | nng-5f7289e1f8e1427c9214c8e3e96ad56b1f868d53.tar.gz nng-5f7289e1f8e1427c9214c8e3e96ad56b1f868d53.tar.bz2 nng-5f7289e1f8e1427c9214c8e3e96ad56b1f868d53.zip | |
fixes #334 Separate context for state machines from sockets
This provides context support for REQ and REP sockets.
More discussion around this is in the issue itself.
Optionally we would like to extend this to the surveyor pattern.
Note that we specifically do not support pollable descriptors
for non-default contexts, and the results of using file descriptors
for polling (NNG_OPT_SENDFD and NNG_OPT_RECVFD) is undefined.
In the future, it might be nice to figure out how to factor in
optional use of a message queue for users who want more buffering,
but we think there is little need for this with cooked mode.
Diffstat (limited to 'docs/man/libnng.3.adoc')
| -rw-r--r-- | docs/man/libnng.3.adoc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index feab3ebf..8df29861 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -195,6 +195,22 @@ The following functions are used to register a transport for use. | <<nng_zt_register.3#,nng_zt_register()>>|register ZeroTier transport |=== +=== Protocol Contexts + +The following functions are useful to separate the protocol processing +from a socket object, into a separate context. +This can allow multiple contexts to be created on a single socket for +concurrent applications. + +|=== +|<<nng_ctx_close.3#,nng_ctx_close()>>|close context +|<<nng_ctx_getopt.3#,nng_ctx_getopt()>>|get context option +|<<nng_ctx_open.3#,nng_ctx_open()>>|create context +|<<nng_ctx_recv.3#,nng_ctx_recv()>>|receive message using context asynchronously +|<<nng_ctx_send.3#,nng_ctx_send()>>|send message using context asynchronously +|<<nng_ctx_setopt.3#,nng_ctx_setopt()>>|set context option +|=== + === URL Object Common functionality is supplied for parsing and handling |
