« ZMQPoll
ZMQPoll::clear »

ZMQPoll::add

(PECL zmq >= 0.5.0)

ZMQPoll::add — Add item to the poll set

説明

public function 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.

パラメータ

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.

戻り値

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

関連キーワード:
item   ZMQPoll   poll   entry   type   added   clear   mixed   Adds   internal   removed   using   returned   ZMQSocket   stream   resource   Defines   what   activity   socket   polled   constants   later   used   remove
関連する関数・ページ:
zmqpoll.remove   class.zmqpoll   zmqpoll.clear   zmqpoll.getlasterrors   zmqpoll.count   book.zmq