### File

`src/lib/socket-io.config.ts`

### Description

Options References: https://github.com/socketio/socket.io-client/blob/master/docs/API.md#new-managerurl-options

### Index

###### Properties
Optional autoConnect Optional enablesXDR Optional extraHeaders Optional forceBase64 Optional forceJSONP Optional jsonp Optional onlyBinaryUpgrades Optional parser Optional path Optional policyPort Optional protocols Optional query Optional randomizationFactor Optional reconnection Optional reconnectionAttempts Optional reconnectionDelay Optional reconnectionDelayMax Optional rememberUpgrade Optional requestTimeout Optional timeout Optional timestampParam Optional timestampRequests Optional transportOptions Optional transports Optional upgrade

### Properties

autoConnect
`autoConnect: `boolean``
Type : `boolean`
Optional
By setting this false, you have to call manager.open whenever you decide it's appropriate. Default: true

enablesXDR
`enablesXDR: `boolean``
Type : `boolean`
Optional
Enables XDomainRequest for IE8 to avoid loading bar flashing with click sound. default to false because XDomainRequest has a flaw of not sending cookie. Default: false

extraHeaders
`extraHeaders: `literal type``
Type : `literal type`
Optional
Additional headers (then found in socket.handshake.headers object on the server-side). Default value: -

forceBase64
`forceBase64: `boolean``
Type : `boolean`
Optional
Forces base 64 encoding for polling transport even when XHR2 responseType is available and WebSocket even if the used standard supports binary. Default: false

forceJSONP
`forceJSONP: `boolean``
Type : `boolean`
Optional
Forces JSONP for polling transport. Default: false

jsonp
`jsonp: `boolean``
Type : `boolean`
Optional
Determines whether to use JSONP when necessary for polling. If disabled (by settings to false) an error will be emitted (saying “No transports available”) if no other transports are available. If another transport is available for opening a connection (e.g. WebSocket) that transport will be used instead. Default: false

onlyBinaryUpgrades
`onlyBinaryUpgrades: `boolean``
Type : `boolean`
Optional
Whether transport upgrades should be restricted to transports supporting binary data. Default: false

parser
`parser: `any``
Type : `any`
Optional
The parser to use. Defaults to an instance of the Parser that ships with Socket.IO Reference: https://github.com/socketio/socket.io-parser

path
`path: `string``
Type : `string`
Optional
Name of the path that is captured on the server side. Default: /socket.io

policyPort
`policyPort: `number``
Type : `number`
Optional
Port the policy server listens on. Default: 843

protocols
`protocols: `any``
Type : `any`
Optional
A list of subprotocols. See https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Subprotocols

query
`query: `literal type``
Type : `literal type`
Optional
Additional query parameters that are sent when connecting a namespace (then found in socket.handshake.query object on the server-side)

randomizationFactor
`randomizationFactor: `number``
Type : `number`
Optional
Randomization factor for the reconnection delay. Default: 0.5

reconnection
`reconnection: `boolean``
Type : `boolean`
Optional
Whether to reconnect automatically. Default: true

reconnectionAttempts
`reconnectionAttempts: `number``
Type : `number`
Optional
Number of reconnection attempts before giving up. Default: infinity

reconnectionDelay
`reconnectionDelay: `number``
Type : `number`
Optional
How long to initially wait before attempting a new reconnection. Default: 1000 +- randomizationFactor

reconnectionDelayMax
`reconnectionDelayMax: `number``
Type : `number`
Optional
Maximum amount of time to wait between reconnections. Default: 5000

rememberUpgrade
`rememberUpgrade: `boolean``
Type : `boolean`
Optional
If true and if the previous websocket connection to the server succeeded, the connection attempt will bypass the normal upgrade process and will initially try websocket. A connection attempt following a transport error will use the normal upgrade process. It is recommended you turn this on only when using SSL/TLS connections, or if you know that your network does not block websockets. Default: false.

requestTimeout
`requestTimeout: `number``
Type : `number`
Optional
Timeout for xhr-polling requests in milliseconds (0) (only for polling transport). Default: 0

timeout
`timeout: `number``
Type : `number`
Optional
Connection timeout before a connect_error and connect_timeout events are emitted. Default: 20000

timestampParam
`timestampParam: `string``
Type : `string`
Optional
The timestamp parameter

timestampRequests
`timestampRequests: `boolean``
Type : `boolean`
Optional
Whether to add the timestamp with each transport request. Note: polling requests are always stamped unless this option is explicitly set to false.

transportOptions
`transportOptions: `any``
Type : `any`
Optional
Hash of options, indexed by transport name, overriding the common options for the given transport. Default: {}

transports
`transports: `string[]``
Type : `string[]`
Optional
A list of transports to try (in order). Engine always attempts to connect directly with the first one, provided the feature detection test for it passes. Default: ["polling", "websocket"]

upgrade
`upgrade: `boolean``
Type : `boolean`
Optional
Whether the client should try to upgrade the transport from long-polling to something better. Default: true

    export interface SocketIoOptions {
      /**
       * Name of the path that is captured on the server side. Default: /socket.io
       */
      path?: string;
      /**
       * Whether to reconnect automatically. Default: true
       */
      reconnection?: boolean;
      /**
       * Number of reconnection attempts before giving up. Default: infinity
       */
      reconnectionAttempts?: number;

      /**
       * How long to initially wait before attempting a new reconnection. Default: 1000 +- randomizationFactor
       */
      reconnectionDelay?: number;

      /**
       * Maximum amount of time to wait between reconnections. Default: 5000
       */
      reconnectionDelayMax?: number;
      /**
       * Randomization factor for the reconnection delay. Default: 0.5
       */
      randomizationFactor?: number;
      /**
       * Connection timeout before a connect_error and connect_timeout events are emitted. Default: 20000
       */
      timeout?: number;
      /**
       * By setting this false, you have to call manager.open whenever you decide it's appropriate. Default: true
       */
      autoConnect?: boolean;
      /**
       * Additional query parameters that are sent when connecting a namespace (then found in socket.handshake.query object on the server-side)
       */
      query?: {
        [key: string]: string | null;
      };
      /**
       * The parser to use. Defaults to an instance of the Parser that ships with Socket.IO
       * Reference: https://github.com/socketio/socket.io-parser
       */
      parser?: any;

      // Options for the underlying Engine.IO client:
      /**
       * Whether the client should try to upgrade the transport from long-polling to something better. Default: true
       */
      upgrade?: boolean;
      /**
       * Forces JSONP for polling transport. Default: false
       */
      forceJSONP?: boolean;
      /**
       * Determines whether to use JSONP when necessary for polling. If disabled (by settings to false) an error will be emitted (saying “No transports available”) if no other transports are available. If another transport is available for opening a connection (e.g. WebSocket) that transport will be used instead. Default: false
       */
      jsonp?: boolean;
      /**
       * Forces base 64 encoding for polling transport even when XHR2 responseType is available and WebSocket even if the used standard supports binary. Default: false
       */
      forceBase64?: boolean;
      /**
       * Enables XDomainRequest for IE8 to avoid loading bar flashing with click sound. default to false because XDomainRequest has a flaw of not sending cookie. Default: false
       */
      enablesXDR?: boolean;
      /**
       * Whether to add the timestamp with each transport request. Note: polling requests are always stamped unless this option is explicitly set to false.
       */
      timestampRequests?: boolean;
      /**
       * The timestamp parameter
       */
      timestampParam?: string;
      /**
       * Port the policy server listens on. Default: 843
       */
      policyPort?: number;
      /**
       * A list of transports to try (in order). Engine always attempts to connect directly with the first one, provided the feature detection test for it passes. Default: ["polling", "websocket"]
       */
      transports?: string[];
      /**
       * Hash of options, indexed by transport name, overriding the common options for the given transport. Default: {}
       */
      transportOptions?: any;
      /**
       * If true and if the previous websocket connection to the server succeeded, the connection attempt will bypass the normal upgrade process and will initially try websocket. A connection attempt following a transport error will use the normal upgrade process. It is recommended you turn this on only when using SSL/TLS connections, or if you know that your network does not block websockets. Default: false.
       */
      rememberUpgrade?: boolean;
      /**
       * Whether transport upgrades should be restricted to transports supporting binary data. Default: false
       */
      onlyBinaryUpgrades?: boolean;
      /**
       * Timeout for xhr-polling requests in milliseconds (0) (only for polling transport). Default: 0
       */
      requestTimeout?: number;
      /**
       * A list of subprotocols. See https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Subprotocols
       */
      protocols?: any;
      /**
       * Additional headers (then found in socket.handshake.headers object on the server-side). Default value: -
       */
      extraHeaders?: {
        [header: string]: string;
      };

      // Additional options for NodeJS Engine.IO clients omitted: https://socket.io/docs/client-api/
    }

    /**
     * Config interface
     * @deprecated use the provideSocketIo function instead
     */
    export interface SocketIoConfig {
      url: string;
      options?: SocketIoOptions;
    }

# results matching ""

# No results matching ""