{ WebSocketClient }
Client class to handle websocket connection
Constructor:
WebSocketClient (
string URI to connect to,
string origin URI to connect from
ws_options struct to set options
Usage:
void onmsg( string msg ){
do_whatever(msg);
}
c = WebSocketClient("ws://server/path");
while(c.state != ws_state.CLOSED ){
c.poll();
c.dispatch(&onmsg);
}
{ WebSocketClient } Client class to handle websocket connection Constructor: WebSocketClient ( string URI to connect to, string origin URI to connect from ws_options struct to set options Usage: void onmsg( string msg ){ do_whatever(msg); } c = WebSocketClient("ws://server/path"); while(c.state != ws_state.CLOSED ){ c.poll(); c.dispatch(&onmsg); }