Haxe WebSockets everywhere! Including javascript, flash and sys targets.
Haxe HTML
Clone or download
tecteun and soywiz proper ssl implementation, handshake is done by haxe.ssl.Socket itse…
…lf (#30)

* Update WebSocketGeneric.hx

Chrome 60.0.3112.113 complains that A server must not mask any frames that it sends to the client. And then closes the connection

* fix for receiving errors when branching from onmessage, set state before triggering onmessage

* Initial version for wss support

* Allow configuration of CA and server certificate/key

* remove log

* Fixed Blocked vs Blocking error, added try/catch to socket close()

* disable keepalive, conflicts with ssl handshake somewhere

* revert try/catch as errors need to propagate in this case.

* proper ssl implementation, handshake is done by haxe.ssl.Socket itself
Latest commit 32b8112 Nov 6, 2017

README.md

Haxelib Version

WebSockets everywhere! Including javascript, flash and sys targets.

class WebSocketExample {
    static public function main() {
        trace('testing!');
        var ws = WebSocket.create("ws://127.0.0.1:8000/", ['echo-protocol'], false);
        ws.onopen = function() {
            trace('open!');
            ws.sendString('hello friend!');
        };
        ws.onmessageString = function(message) {
            trace('message from server!' + message);
        };

        #if sys
        while (true) {
            ws.process();
            Sys.sleep(0.1);
        }
        #end
    }
}