Websocket握手错误

时间:2012-10-17 07:03:07

标签: php jquery websocket xampp

我正在尝试在我的xampp安装上执行此操作。

http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/

当我到shell并输入php -q htdocs \ socket \ server \ startDeamon.php时,我得到了这个......

2012-10-17 08:42:11 System: Socket Resource id #7 created.
2012-10-17 08:42:11 System: Socket bound to localhost:8000.
2012-10-17 08:42:11 System: Start listening on Socket.

Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35

Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35
2012-10-17 08:42:31 WebSocket: Resource id #8 disconnected!

Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35

Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35

可能是什么问题,代码是旧的吗?

这是socketWebSocket.class.php的第35行

$num_sockets = socket_select($changed_sockets,$write=NULL,$exceptions=NULL,NULL);

1 个答案:

答案 0 :(得分:1)

尝试:

$write=NULL;
$exceptions=NULL;
$num_sockets = socket_select($changed_sockets,$write,$exceptions,0);