src/Leevel/Protocol/WebsocketServer.php
public function onMessage(SwooleWebsocketServer $server, SwooleWebsocketFrame $frame): void
    {
        $this->log(
            sprintf(
                'Receive from fd %d:%s,opcode:%d,fin:%d',
                $frame->fd, $frame->data, $frame->opcode, $frame->finish
            )
        );

        if (false === ($pathInfo = $this->getClientPathInfo($frame->fd))) {
            return;
        }

        $request = $this->createRequestWithPathInfo($pathInfo, self::MESSAGE);

        $this->setPreRequestMatched($request, [$server, $frame, $frame->fd]);

        $response = $this->dispatchRouter($request);
    }
public function onMessage(SwooleWebsocketServer $server, SwooleWebsocketFrame $frame): void
    {
        $this->log(
            sprintf(
                'Receive from fd %d:%s,opcode:%d,fin:%d',
                $frame->fd, $frame->data, $frame->opcode, $frame->finish
            )
        );

        if (false === ($pathInfo = $this->getClientPathInfo($frame->fd))) {
            return;
        }

        $request = $this->createRequestWithPathInfo($pathInfo, self::MESSAGE);

        $this->setPreRequestMatched($request, [$server, $frame, $frame->fd]);

        $response = $this->dispatchRouter($request);
    }
监听服务器收到来自客户端的数据帧.

@param \Swoole\Websocket\Server $server
@param \Swoole\Websocket\Frame  $frame

@see https://wiki.swoole.com/wiki/page/397.html