Page 1 of 1

websocket server example

Posted: Sun Jan 31, 2021 4:03 pm
by SimonVs
Hi,

I'm trying to get the websocket server example to work.
In the monitor i see an IP address is obtained but when sending somthing an error is received at the client side:

"failed: Error during WebSocket handshake: Unexpected response code: 302"

Can somebody help me with this?

Thanks in advance!

Re: websocket server example

Posted: Wed Feb 03, 2021 1:21 am
by lowtolerance
The error is telling you that the URL you are pointing to <i>is</i> a valid URI — there is something there, but whatever it is, it’s not what the websocket client is looking for.

Try taking the URL that the client app is directed to, only with “http://” in place of “ws://“, and maybe you’ll have a better idea of what’s going on.

Re: websocket server example

Posted: Sat Feb 06, 2021 5:45 pm
by SimonVs
Hi,

Thanks for the reply. I found out i made a mistake at the client side.
It works fine now.