按照https://github.com/voryx/Thruway的指示,我试图在本地主机( WebSocket connection to 'ws://127.0.0.1:9090/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED )上设置一个websocket服务器,这只会给我WebSocket connection to 'ws://127.0.0.1:9090/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
我通过> php vendor/voryx/thruway/Examples/SimpleClient.php启动了服务器,它为我提供了以下控制台输出:
2016-11-19T18:58:56.4982780 notice [Thruway\Peer\Client 308] Changing PHP precision from 14 to 16 2016-11-19T18:58:56.5007740 info [Thruway\Peer\Client 308] New client created 2016-11-19T18:58:56.5016600 info [Thruway\Transport\PawlTransportProvider 308] Starting Transport
在客户端,我使用了来自https://github.com/crossbario/autobahn-js的推荐示例。这应该有效--我可以成功地连接到测试服务器ws://demo.trway.ws:9090。
在Windows10 php7上测试最新的Chrome。
任何帮助或暗示都将不胜感激。
发布于 2016-11-20 03:59:39
我不确定这是否只是一个错误,但示例路由器是SimpleWsRouter.php而不是SimpleClient.php
https://stackoverflow.com/questions/40696294
复制相似问题