This is a fork of sta's WebsocketSharp that aims at implementing this PR.
I cannot believe this feature is something that has been missing for years.
...
using (var ws = new WebSocket ("ws://dragonsnest.far/Laputa")) {
ws.OnMessage += (sender, e) =>
Console.WriteLine ("Laputa says: " + e.Data);
ws.Headers["Cool-Header"] = "Hello world";
ws.Connect ();
ws.Send ("BALUS");
Console.ReadKey (true);
}
...This should be pretty straightforward. Download/clone the project, build it, and use the websocket-sharp-fix.dll as Project reference or import via the Plugins (Unity).
(Use git clone https://github.com/realcoloride/websocket-sharp-fix to clone the project)
Make sure to build in Release
Good luck with your project!



