windows 下 沒(méi)有onWebSocketConnect
如何獲取 ws://127.0.0.1:8282/2is3wypCyyCzSpB4ZWimRZGXtmMT74nd 后面的參數(shù)?
目前這樣子處理了
$gateway->onConnect=function($connection)
{
$connection->onWebSocketConnect = function($connection , $http_header)
{
p($http_header);
// var_dump($_GET);
preg_match("/GET \/(.*?) /",$http_header,$matches);
p($matches);
if($matches){
}
};
}