php 5.5
gateway 3.0.15
workerman 4.0.3
首先, 未安裝libevent擴(kuò)展前,gateway啟動(dòng)、socket連接等業(yè)務(wù)一切正常。
從 http://pecl.php.net/package/libevent 下載
將php_libevent.dll拷貝到php的ext目錄下
php.ini加: extension=php_libevent.dll
雙擊 start_for_win.bat 啟動(dòng)gateway正常。
業(yè)務(wù)連接時(shí)出錯(cuò):
web頁(yè)面websocket連接出錯(cuò):WebSocket connection to 'ws://localhost:8420/' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
命令行窗口輸出錯(cuò)誤:2020-04-20 08:51:04 pid:1 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
取消加載php_libevent.dll, 一切正常。
請(qǐng)教一下,謝謝?。。?/p>
有可能是windows下 workerman和 libevent兼容問(wèn)題,建議使用linux系統(tǒng),windows僅用于開發(fā)調(diào)試。
或者試下event擴(kuò)展。
謝謝老大。event擴(kuò)展也這樣操作了,甚至同時(shí)加載了libevent和event擴(kuò)展,都發(fā)生了上述同樣錯(cuò)誤。