我的WebSocket實現在Chrome和Firefox中正常工作。 在IE11我得到這個錯誤: Websocket Error: Network Error 12152, The server returned an invalid or unrecognized response 我用js的WebSocket類和reactPhp和https://github.com/ratchetphp/RF
我在Symfony中使用Gos Web Socket Bundle,我嘗試在demo they give中工作。我很迷惑關於端口,因爲它的工作原理,如果端口127.0.0.1:1337但是當我運行的symfony的服務器時,它產生127.0.0.1:8000,所以我嘗試添加在這裏」 gos_web_socket:
server:
port: 8000 #The port t
所以我試圖在Linux實例上設置php的網絡套接字,並有兩個文件。這兩個文件都在我的/ var/www/html目錄中。第一個被稱爲Chat.php,包含以下代碼: <?php
namespace MyApp;
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;
class Chat implem