If you have this error:
Error: Specified protocol was not requested by the client.
at WebSocketRequest.accept (/proj/node_modules/websocket/lib/WebSocketRequest.js:289:19)
this means you have to create a connection at client side like this:
var connection = new WebSocket('ws://127.0.0.1:3000', 'echo-protocol');
instead of this:
var connection = new WebSocket('ws://127.0.0.1:3000');
Also this means you should to handle it at server side not to crash your server.
Error: Specified protocol was not requested by the client.
at WebSocketRequest.accept (/proj/node_modules/websocket/lib/WebSocketRequest.js:289:19)
this means you have to create a connection at client side like this:
var connection = new WebSocket('ws://127.0.0.1:3000', 'echo-protocol');
instead of this:
var connection = new WebSocket('ws://127.0.0.1:3000');
Also this means you should to handle it at server side not to crash your server.
Комментариев нет:
Отправить комментарий