socket.io-client-csharp icon indicating copy to clipboard operation
socket.io-client-csharp copied to clipboard

New NuGet version release

Open jimmyl0l3c opened this issue 1 year ago • 4 comments

Hi, when can we expect new NuGet version with the fixes from the past year to be released? Thanks.

jimmyl0l3c avatar Jul 12 '24 06:07 jimmyl0l3c

Hello, If you really need to use the newest version of SocketIOClient you can remove the NuGet package in your solution, download the source code from the github and then, add the SocketIOClient projects to your solution in Visual Studio. Then you can go to your base project dependencies and add a project dependency with SocketIOClient or whatever you need. Not sure if this helps but that's a solution in the meantime.

Aspher0 avatar Jul 12 '24 07:07 Aspher0

Yeah, the new version released now

doghappy avatar Aug 18 '24 10:08 doghappy

The new version always deadlocks when connecting to SocketIO server (using .NET framework 4.6.1). You can see this example project to reproduce the issue. It worked most of the time when using the previous version (only deadlocked sometimes when the server was unavailable).

image

Based on it waiting for Task<Exception> I suppose there was a problem when connecting to the SocketIO server (even though all went fine on the server side). But even if there is an issue with the server, the client should not deadlock.

Client log (running the example project mentioned above):

Connecting to SocketIO

Server log:

INFO:     127.0.0.1:58420 - "GET /socket.io/?EIO=4&transport=polling HTTP/1.1" 200 OK
connect  uNx0yOyk422RBknJAAAJ
INFO:     127.0.0.1:58420 - "POST /socket.io/?EIO=4&transport=polling&sid=13QTj8_CTJD4qnqfAAAI&t=1728293358 HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 58421) - "WebSocket /socket.io/?EIO=4&transport=websocket&sid=13QTj8_CTJD4qnqfAAAI" [accepted]
INFO:     connection open

jimmyl0l3c avatar Oct 07 '24 09:10 jimmyl0l3c

@jimmyl0l3c hi jimmy, thanks for your useful repo.

There are some compatibility issues between socket.io-client-csharp (client) and python-socketio (server). During handshake socket.io-client-csharp (client) received a message from python-socketio (server) which says client can auto upgrade to websocket. during upgrading we will get the compatibility issue

But for client, we also need to improve, to let user know what happend. I will work on it, thanks for your useful repo agin.

for your workaround:

// client.Options.AutoUpgrade = false;

uncomment it

Note: auto upgrade should be work socket.io-server(official & nodejs server)

doghappy avatar Oct 08 '24 09:10 doghappy