代碼沒錯,應該是環境報錯
WebSocket connection to 'ws://localhost:7777/ws' failed: Error during WebSocket handshake: Unexpected response code: 200
WebSocket connection to 'ws://localhost:7777/ws' failed: Error during WebSocket handshake: Unexpected response code: 200
2018-11-01
舉報
2018-11-06
response code :200 , 這是后端代碼還是提供的是http 服務,
你可能是改了代碼后,忘記停止服務重新編譯運行了
停止原來的http服務,重新編譯、運行就行了