<?php
Swoole\Server->on('pipemessage', callback $callback)
The event name
callback function
if success, it returns TRUE, otherwise it returns FALSE.
Executue the callback function when the Server is receiving the message sent by sendMessage
.
The callback function registered on the event pipemessage
is executed in the Worker Process
which is receiving data.
<?php
function (Swoole\Server $server, int $from_worker_id, mixed $message) {
}
$from_worker_id
the id number of worker when the message from$message
the message