$connection->onWebSocketConnect的时候通过阿里云SLB 7层负载后拿到真实ip后如何传给businessworker里面?

bigman
1646 1 0
1个回答

six
class Events {
    public static function onWebSocketConnect($client_id, $data)
    {
        $_SESSION['ip'] = your_get_ip_func($data);
    }

    public static function onMessage($client_id, $data)
    {
        var_export($_SESSION['ip']);
    }
}
年代过于久远,无法发表回答
×
🔝