-
Hey, I wanted to report this bug. For reasons, I need this lib to be able to communicate with Microsoft's ClientWebSocket (C# .NET WebSocket client that you can see here: https://docs.microsoft.com/es-es/dotnet/api/system.net.websockets.clientwebsocket?view=netframework-4.8). In the past, I used to work with your old library and everything went okay, but when trying out this new one, I find that ClientWebSocket can indeed establish a connection with uWebSockets but if I ever send data to it, uWebSockets will close the connection unexpectedly. I am simply using this method to send data to uWebSockets async: Its use is very simple:
And it simply makes the websocket connection crash. This does not happen in your old lib. Why could it be? I was hoping to be able to use this new one but looks like I'll have to relay on the deprecated lib for now until we find the issue. The Exception it throws is very generic: At first I thought this might be a Unity problem, but I also created a standalone C# Console Application and tried to do the same, the error it throws is also very generic, "The connection with the server finished abnormally". Again, this only happens when uWS receives any data from ClientWebSocket. If I don't to anything other than connect or close the connection, nothing else happens. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Make sure the message size is less than 16kb or whatever maxPayloadLength you specified |
Beta Was this translation helpful? Give feedback.
-
yep it is, the message size is actually just a single byte (a packet header basically), for testing purposes. |
Beta Was this translation helpful? Give feedback.
-
I can't help you with this, you'll have to debug what happens |
Beta Was this translation helpful? Give feedback.
-
Speaking about that, if we put Infinity or something like that to deactivate this, performances are decreased ? What is the need of this parameter? |
Beta Was this translation helpful? Give feedback.
Make sure the message size is less than 16kb or whatever maxPayloadLength you specified