You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a project that I'm working on, I would like to connect through websockets first, and fall back on polling later on. Although not officially supported by the engine.io protocol, the Socket.IO manual specifically mentions this possibility, see 'With websocket transport only'.
When trying this with the engine.io and socket.io haskell library, this does not work. However, trying the following node.js setup with the socket.io implementation, it connects perfectly.
var io = require('socket.io')(4000,{path:"/mysocket"});
io.on('connection', (socket)=> {
console.log('connection');
});
Looking at the logs wireshark creates, the issue seems to be the reply that the server sends: while the js implementation sends a response 101 (Switching Protocols), the haskell implementation responds with a 200 (OK), which is the default response at the end of the 'freshSession' function.
The text was updated successfully, but these errors were encountered:
@Matthiasvanderhallen what version of socket-io client was used for testing?
It looks like haskell implementation doesn't support socket-io 2.x.x. Chat example works with 1.2.1.
After this client made request with websocket transport request with sid in query param. After this server upgrade the connection to websocket.
In case of websocket only transport. Client made websocket request and should receive first message with such json from server via websocket connection.
It looks like haskell server doesn't handle this part correctly, it always expects sid in websocket request in query params.
Hi!
For a project that I'm working on, I would like to connect through websockets first, and fall back on polling later on. Although not officially supported by the engine.io protocol, the Socket.IO manual specifically mentions this possibility, see 'With websocket transport only'.
When trying this with the engine.io and socket.io haskell library, this does not work. However, trying the following node.js setup with the socket.io implementation, it connects perfectly.
app.js
Server.js
Looking at the logs wireshark creates, the issue seems to be the reply that the server sends: while the js implementation sends a response 101 (Switching Protocols), the haskell implementation responds with a 200 (OK), which is the default response at the end of the 'freshSession' function.
The text was updated successfully, but these errors were encountered: