becvert/cordova-plugin-websocket-server

How to connect

northkode opened this issue · 4 comments

How does an outside device connect to this..

all i get on starting the server is:

index.js:69 Listening on :::41574

but when i use my local ip from my network it says:
VM3493:1 WebSocket connection to 'ws://192.168.1.72:41574/' failed: Error during WebSocket handshake: Unexpected response code: 404

What's an outside device for you?
Your client needs to be on the same network.
Also you need a pure web socket client implementation to be able to connect.
socket.io's client won't do as far as I know for instance.

I've same problem and try it with socket.io and with pure WebSocket but the result was the same - the 'handshake error 404'.
And I've try to remove some properties from 'start' method options: "origins", "protocols" and "tcpNoDelay" (I've copypasted them from README.md example) and It works for me
HIH

release 1.4.10 should fix this. protocols option was the culprit.

Closing now