Jack
Jack

Reputation: 93

WebSockets - Ratchet (Thruway)

I have a problem when connecting to websocket server when using Chrome on OSX.

If I try to connect to server using Firefox it works well but if I use Chrome there is an error message:

Error during WebSocket handshake: Unexpected response code: 302.

Let me know if you need more information.

Upvotes: 0

Views: 1063

Answers (1)

mbonneau
mbonneau

Reputation: 617

Thruway is actually a WAMPv2 router and client (allows RPC and pub/sub patterns), not raw websockets as the websocket.org echo test is expecting. I am not sure why it would allow anything in either browser.

If you are looking for raw websocket communication with PHP, check out https://github.com/ratchetphp/Ratchet and https://github.com/ratchetphp/Pawl (Thruway uses these libraries for websocket related tasks.)

Upvotes: 0

Related Questions