array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'zmqpoll.add.php', 1 => 'ZMQPoll::add', 2 => 'Add item to the poll set', ), 'up' => array ( 0 => 'class.zmqpoll.php', 1 => 'ZMQPoll', ), 'prev' => array ( 0 => 'class.zmqpoll.php', 1 => 'ZMQPoll', ), 'next' => array ( 0 => 'zmqpoll.clear.php', 1 => 'ZMQPoll::clear', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/zmq/zmqpoll/add.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

ZMQPoll::add

(PECL zmq >= 0.5.0)

ZMQPoll::addAdd item to the poll set

Beschreibung

public ZMQPoll::add(mixed $entry, int $type): string

Adds a new item to the poll set and returns the internal id of the added item. The item can be removed from the poll set using the returned string id.

Parameter-Liste

entry

ZMQSocket object or a PHP stream resource

type

Defines what activity the socket is polled for. See ZMQ::POLL_IN and ZMQ::POLL_OUT constants.

Rückgabewerte

Returns a string id of the added item which can be later used to remove the item. Throws ZMQPollException on error.