Swoole Server send

public boolean Swoole\Server::send ( integer $fd , string $data [, integer $reactor_id ] )

Alias: swoole_server->send( integer $fd , string $data [, integer $reactor_id ] )

Send data to the remote TCP socket.

Parameter

  • $fd the id number of client
  • $data the function that triggered after with a fixed time delay
  • $extraData the extra data of sending data

Return

the result of send data to the client

If the result is false, you can call the method $server->getLastError() to get the error code.

Example