<?php
Swoole\WebSocket\Server->getClientInfo (int $fd)
The fd of the WebSocket connection, it can be get from the frame.
if success, it returns TRUE, otherwise it returns FALSE.
Get the TCP connection info.
You can get the websocket connection status websocket_status
with function $server->getClientInfo($fd)
:
WEBSOCKET_STATUS_CONNECTION
= 1, connection created and wait for handshakeWEBSOCKET_STATUS_HANDSHAKE
= 2, in the process of handshakeWEBSOCKET_STATUS_FRAME
= 3, handshake finished and wait for tranforming message