Variables

Methods

dynamiconclose (code:Int):Void

dynamiconerror (message:String):Void

dynamiconmessageBytes (message:Bytes):Void

dynamiconmessageString (message:String):Void

dynamiconopen ():Void

sendBytes (message:Bytes):Void

Static methods

@:value({ debug : false, origin : null, protocols : null })staticdynamiccreate (url:String, ?protocols:Array<String>, ?origin:String, debug:Bool = false):WebSocket

@:value({ debug : false, alreadyRecieved : "" })staticcreateFromAcceptedSocket (socket:Socket2, alreadyRecieved:String = "", debug:Bool = false):WebSocket

create server websocket from socket returned by accept() wait for onopen() to be called before using websocket

Parameters:

socket
  • accepted socket
alredyRecieved
  • data already read from socket, it should be no more then full http header
debug
  • debug messages?

staticdynamicdefer (callback:Void ‑> Void):Void