API Docs for: 2.0.0

Class WebsocketIO

Class defined in: src/node-websocket.io.js:25

Client socket object

WebsocketIO( ws, strictSSL, openCallback )
src/node-websocket.io.js:25
Parameters:
  • ws <Object>

    ULR of the server or actual websocket

  • strictSSL <Bool>

    require or not SSL verification with a certiifcate

  • openCallback <Function>

    callback when the socket opens

emit( name, data )
public/src/websocket.io.js:178

Send a message with a given name and payload (format> f:name d:payload)

Parameters:
  • name <String>

    name of the message (i.e. RPC)

  • data <Object>

    data to be sent with the message

emit( )
public/src/websocket.io.js:234

Deliberate close function

emit( name, data )
src/node-websocket.io.js:127

Send a message with a given name and payload (format> f:name d:payload)

Parameters:
  • name <String>

    name of the message (i.e. RPC)

  • data <Object>

    data to be sent with the message

emitString( data )
src/node-websocket.io.js:191

Faster version for emit: No JSON stringigy and no check version

Parameters:
  • data <String>

    data to be sent as the message

on( name, callback )
public/src/websocket.io.js:160

Set a message handler for a given name

Parameters:
  • name <String>

    name for the handler

  • callback <Function>

    handler to be called for a given name

on( name, callback )
src/node-websocket.io.js:112

Set a message handler for a given name

Parameters:
  • name <String>

    name for the handler

  • callback <Function>

    handler to be called for a given name

onclose( callback )
src/node-websocket.io.js:102

Setting a callback when the socket closes

Parameters:
  • callback <Function>

    function to execute after closing

open( callback )
public/src/websocket.io.js:104

Open a websocket

Parameters:
  • callback <Function>

    function to be called when the socket is ready

updateRemoteAddress( host, port )
src/node-websocket.io.js:221

Update the remote address of the client

Parameters:
  • host <String>

    hostname / ip address

  • port <Integer>

    port number

aliasCount <Integer>
public/src/websocket.io.js:48

number of aliases created for listeners

bytesWritten!~YUIDOC_LINE~!type <Number>
public/src/websocket.io.js:72

bytes sent property

bytesWritten!~YUIDOC_LINE~!type <Number>
public/src/websocket.io.js:88

bytes received property

localListeners <Object>
public/src/websocket.io.js:64

list of local listeners on this side of connection

messages <Object>
public/src/websocket.io.js:40

list of messages to be handled (name + callback)

remoteListeners <Object>
public/src/websocket.io.js:56

list of listeners on other side of connection

ws <WebSocket>
public/src/websocket.io.js:32

websocket object handling the communication with the server