Jon Portnoy > POEx-ZMQ3-0.060002 > POEx::ZMQ3::Context

Download:
POEx-ZMQ3-0.060002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.060002   Source   Latest Release: POEx-ZMQ3-0.060004

NAME ^

POEx::ZMQ3::Context - A ZMQ context singleton

SYNOPSIS ^

  ## ::Context->new() returns (lazy build) singleton:
  my $zsock = zmq_socket( POEx::ZMQ3::Context->new, $type );
  ## ... if you fork later:
  POEx::ZMQ3::Context->reset;

DESCRIPTION ^

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.

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.

AUTHOR ^

Jon Portnoy <avenj@cobaltirc.org>

syntax highlighting: