所以我下载了这个库:,并将这个例子完全上传到我的服务器上。我用chrome运行它,并获得了很长一段时间的WebSocket - status 0,以及之后的Disconnected - status 2。我检查了,我的服务器确实支持套接字。您可以在指向库的链接中看到源代码,下面是我将其上传到:的地方。有人能帮我找出问题所在吗?
我尝试使用,但如果我不将预期的端口(例如1234)添加到httpd.conf (Listen 1234),我会得到:但是如果我真的添加了它,在调用socket_bind时就会得到这个错误这对于任何端口都是正确的(我尝试了几个)。我使用CentOS 6。在的评论之后,我从httpd.conf中删除了Listen 1234,现在的问题是:
No connection could be ma
the web sockets server script (the server is started at the far bottom of this file) $Server = new PHPWebSocket();
$Server->bind('message', 'wsOnMessage