Open arjanwiegel opened 8 years ago
Hello there,
On which OS do you use Unity?
I use unity 5.3.4 x64 for Windows. I believe that is has to do with the mono frontend that's not 100% compatible with .NET. Simple things like compression are not available. We managed to work around this by de-activating the compression and recompiling the DLL.
Simple things like compression are not available.
You are right. Unfortunately, it is not available at least with Unity for Windows.
FYI, you use this library as role of a server? If so, you can ignore extensions, with such as below:
yourServer.AddWebSocketService<YourBehavior> (
"/YourServicePath",
() =>
new YourBehavior () {
// To ignore the extensions requested from a client.
IgnoreExtensions = true
}
);
Nice! That defeats Hacking into the code nd recompiling crippled dll. 😃
Contrary to Chrome, Firefox sends its websocket-client messages with the "permessage-deflate" extension, which causes a "monoPosixHelper" helper error in Unity upon reception of the first message. This error closes the connection to the client.
client code: `` socket = new WebSocket("ws://192.168.20.223/get");
socket.onmessage=function(event){console.log("message:");console.log(event);}
socket.send("Hello World"); ``