Beispiel #1
0
 /**
  * @param swoole_server $server
  * @param swoole_websocket_frame $frame
  * @return mixed
  */
 public function doMessage(swoole_server $server, swoole_websocket_frame $frame)
 {
     echo "receive from {$frame->fd}:{$frame->data},opcode:{$frame->opcode},fin:{$frame->finish}\n";
     $server->push($frame->fd, "this is server");
 }