Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SIOConnectorOptions

Hierarchy

  • SIOConnectorOptions

Index

Properties

Optional allowRequest

allowRequest: function

A function that receives a given handshake or upgrade request as its first parameter, and can decide whether to continue or not. The second argument is a function that needs to be called with the decided information: fn( err, success ), where success is a boolean value where false means that the request is rejected, and err is an error code (engine.io)

default

null

Type declaration

    • (request: any, callback: function): void
    • Parameters

      • request: any
      • callback: function
          • (err: number, success: boolean): void
          • Parameters

            • err: number
            • success: boolean

            Returns void

      Returns void

Optional allowUpgrades

allowUpgrades: boolean

Whether to allow transport upgrades (engine.io)

default

true

Optional cookie

cookie: string | boolean

Name of the HTTP cookie that contains the client sid to send as part of handshake response headers. Set to false to not send one (engine.io)

default

"io"

Optional httpCompression

httpCompression: Object | boolean

Parameters of the http compression for the polling transports (see zlib). Set to false to disable, or set an object with parameter "threshold:number" to only compress data if the byte size is above this value (1024) (engine.io)

default

true|1024

Optional maxHttpBufferSize

maxHttpBufferSize: number

How many bytes or characters a message can be when polling, before closing the session (to avoid Dos) (engine.io)

default

10E7

Optional origins

origins: string

Accepted origins

default

':'

Optional path

path: string

The path to server the client file to

default

'/socket.io'

Optional perMessageDeflate

perMessageDeflate: Object | boolean

parameters of the WebSocket permessage-deflate extension (see ws module). Set to false to disable (engine.io)

default

true

Optional pingInterval

pingInterval: number

How many milliseconds before sending a new ping packet (keep-alive) (engine.io)

default

25000

Optional pingTimeout

pingTimeout: number

How many milliseconds without a pong packed to consider the connection closed (engine.io)

default

60000

Optional serveClient

serveClient: boolean

Should we serve the client file?

default

true

Optional transports

transports: string[]

Transports to allow connections to (engine.io)

default

['polling','websocket']