php8.5
Home/ Manual/ zmq / zmqsocket/ ZMQSocket::send

ZMQSocket::send

PHP function Edit on GitHub ✎

(PECL zmq >= 0.5.0)

Sends a message

Description

ZMQSocket::send(string $message, int $mode = 0): ZMQSocket

Send a message using the socket. The operation can block unless ZMQ::MODE_NOBLOCK is used.

Parameters

message

The message to send.

mode

Pass mode flags to receive multipart messages or non-blocking operation. See ZMQ::MODE_* constants.

Return Values

Returns the current object. Throws ZMQSocketException on error. If ZMQ::MODE_NOBLOCK is used and the operation would block Boolean false shall be returned.

Source: reference/zmq/zmqsocket/send.xml · from the official PHP manual (php/doc-en)