ZMQ(3) 1 ZMQ(3)
The ZMQ class
INTRODUCTION
CLASS SYNOPSIS
ZMQ
ZMQ
Constants
o const integer$ZMQ::SOCKET_PAIR
o const integer$ZMQ::SOCKET_PUB
o const integer$ZMQ::SOCKET_SUB
o const integer$ZMQ::SOCKET_REQ
o const integer$ZMQ::SOCKET_REP
o const integer$ZMQ::SOCKET_XREQ
o const integer$ZMQ::SOCKET_XREP
o const integer$ZMQ::SOCKET_PUSH
o const integer$ZMQ::SOCKET_PULL
o const integer$ZMQ::SOCKET_ROUTER
o const integer$ZMQ::SOCKET_DEALER
o const integer$ZMQ::SOCKET_XPUB
o const integer$ZMQ::SOCKET_XSUB
o const integer$ZMQ::SOCKET_STREAM
o const integer$ZMQ::SOCKOPT_HWM
o const integer$ZMQ::SOCKOPT_SNDHWM
o const integer$ZMQ::SOCKOPT_RCVHWM
o const integer$ZMQ::SOCKOPT_AFFINITY
o const integer$ZMQ::SOCKOPT_IDENTITY
o const integer$ZMQ::SOCKOPT_SUBSCRIBE
o const integer$ZMQ::SOCKOPT_UNSUBSCRIBE
o const integer$ZMQ::SOCKOPT_RATE
o const integer$ZMQ::SOCKOPT_RECOVERY_IVL
o const integer$ZMQ::SOCKOPT_RECONNECT_IVL
o const integer$ZMQ::SOCKOPT_RECONNECT_IVL_MAX
o const integer$ZMQ::SOCKOPT_MCAST_LOOP
o const integer$ZMQ::SOCKOPT_SNDBUF
o const integer$ZMQ::SOCKOPT_RCVBUF
o const integer$ZMQ::SOCKOPT_RCVMORE
o const integer$ZMQ::SOCKOPT_TYPE
o const integer$ZMQ::SOCKOPT_LINGER
o const integer$ZMQ::SOCKOPT_BACKLOG
o const integer$ZMQ::SOCKOPT_MAXMSGSIZE
o const integer$ZMQ::SOCKOPT_SNDTIMEO
o const integer$ZMQ::SOCKOPT_RCVTIMEO
o const integer$ZMQ::SOCKOPT_IPV4ONLY
o const integer$ZMQ::SOCKOPT_LAST_ENDPOINT
o const integer$ZMQ::SOCKOPT_TCP_KEEPALIVE_IDLE
o const integer$ZMQ::SOCKOPT_TCP_KEEPALIVE_CNT
o const integer$ZMQ::SOCKOPT_TCP_KEEPALIVE_INTVL
o const integer$ZMQ::SOCKOPT_TCP_ACCEPT_FILTER
o const integer$ZMQ::SOCKOPT_TCP_ACCEPT_FILTER
o const integer$ZMQ::SOCKOPT_DELAY_ATTACH_ON_CONNECT
o const integer$ZMQ::SOCKOPT_XPUB_VERBOSE
o const integer$ZMQ::SOCKOPT_ROUTER_RAW
o const integer$ZMQ::SOCKOPT_IPV6
o const integer$ZMQ::CTXOPT_MAX_SOCKETS
o const integer$ZMQ::POLL_IN
o const integer$ZMQ::POLL_OUT
o const integer$ZMQ::MODE_NOBLOCK
o const integer$ZMQ::MODE_DONTWAIT
o const integer$ZMQ::MODE_SNDMORE
o const integer$ZMQ::ERR_INTERNAL
o const integer$ZMQ::ERR_EAGAIN
o const integer$ZMQ::ERR_ENOTSUP
o const integer$ZMQ::ERR_EFSM
o const integer$ZMQ::ERR_ETERM
Methods
o private ZMQ::__construct (void )
PREDEFINED CONSTANTS
ZMQ CONSTANT TYPES
o ZMQ::SOCKET_PAIR -Exclusive pair pattern
o ZMQ::SOCKET_PUB -Publisher socket
o ZMQ::SOCKET_SUB -Subscriber socket
o ZMQ::SOCKET_REQ -Request socket
o ZMQ::SOCKET_REP -Reply socket
o ZMQ::SOCKET_XREQ -Alias for SOCKET_DEALER
o ZMQ::SOCKET_XREP -Alias for SOCKET_ROUTER
o ZMQ::SOCKET_PUSH -Pipeline upstream push socket
o ZMQ::SOCKET_PULL -Pipeline downstream pull socket
o ZMQ::SOCKET_ROUTER -Extended REP socket that can route replies to requesters
o ZMQ::SOCKET_DEALER -Extended REQ socket that load balances to all connected peers
o ZMQ::SOCKET_XPUB -Similar to SOCKET_PUB, except you can receive subscriptions as messages. The subscription message is 0 (unsub-
scribe) or 1 (subscribe) followed by the topic.
o ZMQ::SOCKET_XSUB -Similar to SOCKET_SUB, except you can send subscriptions as messages. See SOCKET_XPUB for format.
o ZMQ::SOCKET_STREAM -Used to send and receive TCP data from a non-OMQ peer. Available if compiled against ZeroMQ 4.x or higher
(Value: integer).
o ZMQ::SOCKOPT_HWM -The high water mark for inbound and outbound messages is a hard limit on the maximum number of outstanding mes-
sages OMQ shall queue in memory for any single peer that the specified socket is communicating with. Setting this option on a
socket will only affect connections made after the option has been set. On ZeroMQ 3.x this is a wrapper for setting both SNDHWM
and RCVHWM. (Value: integer).
o ZMQ::SOCKOPT_SNDHWM -The ZMQ_SNDHWM option shall set the high water mark for outbound messages on the specified socket. Available
if compiled against ZeroMQ 3.x or higher (Value: integer).
o ZMQ::SOCKOPT_RCVHWM -The ZMQ_SNDHWM option shall set the high water mark for inbound messages on the specified socket. Available
if compiled against ZeroMQ 3.x or higher (Value: integer).
o ZMQ::SOCKOPT_AFFINITY - Set I/O thread affinity (Value: integer)
o ZMQ::SOCKOPT_IDENTITY -Set socket identity (Value: string)
o ZMQ::SOCKOPT_SUBSCRIBE -Establish message filter. Valid for subscriber socket (Value: string)
o ZMQ::SOCKOPT_UNSUBSCRIBE -Remove message filter. Valid for subscriber socket (Value: string)
o ZMQ::SOCKOPT_RATE -Set rate for multicast sockets (pgm) (Value: integer >= 0)
o ZMQ::SOCKOPT_RECOVERY_IVL - Set multicast recovery interval (Value: integer >= 0)
o ZMQ::SOCKOPT_RECONNECT_IVL - Set the initial reconnection interval (Value: integer >= 0)
o ZMQ::SOCKOPT_RECONNECT_IVL_MAX - Set the max reconnection interval (Value: integer >= 0)
o ZMQ::SOCKOPT_MCAST_LOOP - Control multicast loopback (Value: integer >= 0)
o ZMQ::SOCKOPT_SNDBUF -Set kernel transmit buffer size (Value: integer >= 0)
o ZMQ::SOCKOPT_RCVBUF - Set kernel receive buffer size (Value: integer >= 0)
o ZMQ::SOCKOPT_RCVMORE -Receive multi-part messages (Value: integer)
o ZMQ::SOCKOPT_TYPE -Get the socket type. Valid for getSockOpt (Value: integer)
o ZMQ::SOCKOPT_LINGER -The linger value of the socket. Specifies how long the socket blocks trying flush messages after it has been
closed (Value: integer)
o ZMQ::SOCKOPT_BACKLOG -The SOCKOPT_BACKLOG option shall set the maximum length of the queue of outstanding peer connections for the
specified socket; this only applies to connection-oriented transports. (Value: integer)
o ZMQ::SOCKOPT_MAXMSGSIZE -Limits the maximum size of the inbound message. Value -1 means no limit. Available if compiled against
ZeroMQ 3.x or higher (Value: integer)
o ZMQ::SOCKOPT_SNDTIMEO -Sets the timeout for send operation on the socket. Value -1 means no limit. Available if compiled against
ZeroMQ 3.x or higher (Value: integer)
o ZMQ::SOCKOPT_RCVTIMEO -Sets the timeout for receive operation on the socket. Value -1 means no limit. Available if compiled
against ZeroMQ 3.x or higher (Value: integer)
o ZMQ::SOCKOPT_IPV4ONLY -Disable IPV6 support if 1. Available if compiled against ZeroMQ 3.x (Value: integer)
o ZMQ::SOCKOPT_LAST_ENDPOINT -Retrieve the last connected endpoint - for use with * wildcard ports. Available if compiled against
ZeroMQ 3.x or higher (Value: string)
o ZMQ::SOCKOPT_TCP_KEEPALIVE_IDLE -Idle time for TCP keepalive. Available if compiled against ZeroMQ 3.x or higher (Value: integer)
o ZMQ::SOCKOPT_TCP_KEEPALIVE_CNT -Count time for TCP keepalive. Available if compiled against ZeroMQ 3.x or higher (Value: integer)
o ZMQ::SOCKOPT_TCP_KEEPALIVE_INTVL -Interval for TCP keepalive. Available if compiled against ZeroMQ 3.x or higher (Value: integer)
o ZMQ::SOCKOPT_DELAY_ATTACH_ON_CONNECT -Set a CIDR string to match against incoming TCP connections. Available if compiled against
ZeroMQ 3.x or higher (Value: string)
o ZMQ::SOCKOPT_TCP_ACCEPT_FILTER -Set a CIDR string to match against incoming TCP connections. Available if compiled against ZeroMQ
3.x or higher (Value: string)
o ZMQ::SOCKOPT_XPUB_VERBOSE -Set the XPUB to receive an application message on each instance of a subscription. Available if com-
piled against ZeroMQ 3.x or higher (Value: string)
o ZMQ::SOCKOPT_ROUTER_RAW -Sets the raw mode on the ROUTER, when set to 1. In raw mode when using tcp:// transport the socket will
read and write without ZeroMQ framing. Available if compiled against ZeroMQ 4.0 or higher (Value: string)
o ZMQ::SOCKOPT_IPV6 -Enable IPV6. Available if compiled against ZeroMQ 4.0 or higher (Value: string)
o ZMQ::CTXOPT_MAX_SOCKETS -The socket limit for this context. Available if compiled against ZeroMQ 3.x or higher (Value: integer)
o ZMQ::POLL_IN -Poll for incoming data
o ZMQ::POLL_OUT -Poll for outgoing data
o ZMQ::MODE_NOBLOCK -Non-blocking operation. Deprecated, use ZMQ::MODE_DONTWAIT instead
o ZMQ::MODE_DONTWAIT -Non-blocking operation
o ZMQ::MODE_SNDMORE -Send multi-part message
o ZMQ::DEVICE_FORWARDER -Forwarder device
o ZMQ::DEVICE_QUEUE -Queue device
o ZMQ::DEVICE_STREAMER -Streamer device
o ZMQ::ERR_INTERNAL -ZMQ extension internal error
o ZMQ::ERR_EAGAIN -Implies that the operation would block when ZMQ::MODE_DONTWAIT is used
o ZMQ::ERR_ENOTSUP -The operation is not supported by the socket type
o ZMQ::ERR_EFSM -The operation can not be executed because the socket is not in correct state
o ZMQ::ERR_ETERM -The context has been terminated
PHP Documentation Group ZMQ(3)