POEx::ZMQ3::Context - A ZMQ context singleton
my $zsock = zmq_socket( # ->new() returns a (lazily built) singleton: POEx::ZMQ3::Context->new, 'REQ' ); # ... if you fork later: POEx::ZMQ3::Context->reset;
A ZeroMQ context should be shared amongst pieces of a single process.
This is the singleton used internally by POEx::ZMQ3 bits; you can use it to retrieve the current context object if you are adding independently-managed ZMQ::LibZMQ3 sockets to the currently-running process.
Forked children should call POEx::ZMQ3::Context->reset before issuing new socket operations.
POEx::ZMQ3::Context->reset
Calling POEx::ZMQ::Context->term will force a context termination. This may block (and is rarely needed); see the man page for zmq_ctx_destroy.
POEx::ZMQ::Context->term
Retrieves the ZMQ::LibZMQ3 context object for the current interpreter.
The object is a singleton; if it doesn't exist when new is called, it will be created.
new
Clears (but does not forcibly terminate, see "term") the current context object.
Should be called in forked children to gain a fresh context object on the next call to "new".
Force a context termination; calls "reset" before issuing a zmq_ctx_destroy(3).
zmq_ctx_destroy(3)
Jon Portnoy <avenj@cobaltirc.org>
To install POEx::ZMQ3, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POEx::ZMQ3
CPAN shell
perl -MCPAN -e shell install POEx::ZMQ3
For more information on module installation, please visit the detailed CPAN module installation guide.