api documentation for ws (v2.2.2)

Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js

table of contents

  1. module ws
    1. function ws.Receiver (extensions, maxPayload, binaryType)
    2. function ws.Sender (socket, extensions)
    3. function ws.Server (Boolean|Object)
    4. number ws.CLOSED
    5. number ws.CLOSING
    6. number ws.CONNECTING
    7. number ws.OPEN
    8. object ws.BufferUtil
    9. object ws.Constants
    10. object ws.ErrorCodes
    11. object ws.EventTarget
    12. object ws.Extensions
  2. module ws.BufferUtil
    1. function ws.BufferUtil.concat (list, totalLength)
    2. function ws.BufferUtil.mask (source, mask, output, offset, length)
    3. function ws.BufferUtil.unmask (buffer, mask)
  3. module ws.Constants
    1. function ws.Constants.NOOP ()
    2. object ws.Constants.BINARY_TYPES
    3. object ws.Constants.EMPTY_BUFFER
    4. string ws.Constants.GUID
  4. module ws.ErrorCodes
    1. function ws.ErrorCodes.isValidErrorCode (code)
    2. string ws.ErrorCodes.1000
    3. string ws.ErrorCodes.1001
    4. string ws.ErrorCodes.1002
    5. string ws.ErrorCodes.1003
    6. string ws.ErrorCodes.1004
    7. string ws.ErrorCodes.1005
    8. string ws.ErrorCodes.1006
    9. string ws.ErrorCodes.1007
    10. string ws.ErrorCodes.1008
    11. string ws.ErrorCodes.1009
    12. string ws.ErrorCodes.1010
    13. string ws.ErrorCodes.1011
    14. string ws.ErrorCodes.1012
    15. string ws.ErrorCodes.1013
  5. module ws.EventTarget
    1. function ws.EventTarget.addEventListener (method, listener)
    2. function ws.EventTarget.removeEventListener (method, listener)
  6. module ws.Extensions
    1. function ws.Extensions.format (value)
    2. function ws.Extensions.parse (value)

module ws

function ws.Receiver (extensions, maxPayload, binaryType)

function ws.Sender (socket, extensions)

function ws.Server (Boolean|Object)

module ws.BufferUtil

function ws.BufferUtil.concat (list, totalLength)

function ws.BufferUtil.mask (source, mask, output, offset, length)

function ws.BufferUtil.unmask (buffer, mask)

module ws.Constants

function ws.Constants.NOOP ()

module ws.ErrorCodes

function ws.ErrorCodes.isValidErrorCode (code)

module ws.EventTarget

function ws.EventTarget.addEventListener (method, listener)

function ws.EventTarget.removeEventListener (method, listener)

module ws.Extensions

function ws.Extensions.format (value)

function ws.Extensions.parse (value)

[ this document was created with utility2 ]