kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
752 stars 272 forks source link

Why is WebSocket4Net client closing socket with 1011 error? #159

Closed CaledoniaProject closed 4 years ago

CaledoniaProject commented 4 years ago

I have a python3 websocket server and a WebSocket4Net client.

During tests, the csharp client always closes in ~30s, and the python server complains like this:

code = 1006 (connection closed abnormally [internal]), no reason

From wireshark I can tell the socket close is initiated from the client,

screen 2019-09-13 at 17 34 37

And nodejs client wscat works fine:

%> wscat -n -c ws://192.168.154.200:11111
connected (press CTRL+C to quit)
received PING
>

So it's definitely a WebSocket4Net issue. I've looked through the whole repository, there's no where closing the socket with 1011 error code, can you help?

CaledoniaProject commented 4 years ago

For anyone experiencing this issue, use https://github.com/sta/websocket-sharp instead. WebSocket4Net is no longer under active development, sigh.

silentcr commented 3 years ago

thank you for remind us