Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PusherConfig

Hierarchy

Index

Properties

Optional activityTimeout

activityTimeout: undefined | number

After this time (in miliseconds) without any messages received from the server, a ping message will be sent to check if the connection is still working. Default value is is supplied by the server, low values will result in unnecessary traffic.

Optional auth

auth: undefined | object

Authentication information for the underlying connector

Optional authEndpoint

authEndpoint: undefined | string

The authentication endpoint

Optional authTransport

authTransport: "ajax" | "jsonp"

Defines how the authentication endpoint, defined using authEndpoint, will be called. There are two options available: ajax and jsonp.

Optional authorizer

authorizer: Authorizer

If you need custom authorization behavior you can provide your own authorizer function as follows:

Optional broadcaster

broadcaster: undefined | "pusher"

Optional client

client: pusher.Pusher

A pusher client instance to use

Optional cluster

cluster: undefined | string

Allows connecting to a different datacenter by setting up correct hostnames and ports for the connection.

Optional csrfToken

csrfToken: string | null

The application CSRF token

Optional disableStats

disableStats: undefined | true | false

Disables stats collection, so that connection metrics are not submitted to Pusher’s servers. These stats are used for internal monitoring only and they do not affect the account stats.

Optional disabledTransports

disabledTransports: Transport[]

Specified which transports must not be used by Pusher to establish a connection. This settings overwrites transports whitelisted via the enabledTransports options. Available transports: ws, wss, xhr_streaming, xhr_polling, sockjs. Additional transports may be added in the future and without adding them to this list, they will be enabled.

Optional enabledTransports

enabledTransports: Transport[]

Specifies which transports should be used by Pusher to establish a connection. Useful for applications running in controlled, well-behaving environments. Available transports: ws, wss, xhr_streaming, xhr_polling, sockjs. Additional transports may be added in the future and without adding them to this list, they will be disabled.

Optional encrypted

encrypted: undefined | true | false

Forces the connection to use encrypted transports.

Optional host

host: string | null

The pusher host to connect to

Optional httpHost

httpHost: undefined | string

Optional httpPort

httpPort: undefined | number

Optional httpsPort

httpsPort: undefined | number

Optional ignoreNullOrigin

ignoreNullOrigin: undefined | true | false

Ignores null origin checks for HTTP fallbacks. Use with care, it should be disabled only if necessary (i.e. PhoneGap).

Optional key

key: string | null

The pusher auth key

Optional namespace

namespace: undefined | string

The namespace to use for events

Optional pongTimeout

pongTimeout: undefined | number

Time before the connection is terminated after sending a ping message. Default is 30000 (30s). Low values will cause false disconnections, if latency is high.

Optional wsHost

wsHost: undefined | string

Optional wsPath

wsPath: undefined | string

Optional wsPort

wsPort: undefined | number

Optional wssPort

wssPort: undefined | number