Contexts allow the independent and concurrent use of stateful operations
using the same socket. For example, two different contexts created on a rep
socket can each receive requests, and send replies to them, without any
regard to or interference with each other.
Only the following protocols support creation of contexts: req, rep, sub
(in a pub/sub pattern), surveyor, respondent.
To send and receive over a context use send
and
recv
or their async counterparts send_aio
and
recv_aio
.
For nano objects, use the $context_open()
method, which will attach a
new context at $context
. See nano
.