Constructor

new (_host:String)

Connect to the given host (works for wss and ws)

Parameters:

_host
  • The url of the host

Methods

dynamiconClose (m:Int):Void

Event listener for when the socket is closed

dynamiconError (s:String):Void

Event listener for when the socket errors

Parameters:

s
  • The error.

dynamiconMessage (m:String):Void

Event listener for when a message is received

Parameters:

m
  • The message recieved;

dynamiconReady ():Void

Event listener for when the socket is open and connected

send (m:String):Void

Send a raw string as a message.

Parameters:

m
  • The string to send.

sendJson (d:Dynamic):Void

Send any object as json.

Parameters:

d
  • The object to send.