Namespace

Namespace Represents a pool of sockets connected under a given scope identified by a pathname (eg: /chat). By default the client always connects to /. Events connection / connect. Fired upon a connection. Parameters: Socket the incoming socket.

Migration from 0.9

For most applications, the transition to 1.0 should be completely seamless and devoid of any hiccups. That said, we’ve done some work to streamline some APIs, and we have changed some internals, so this is a recommended read for most existing users. Authentication differences Socket.io uses middleware now You can give a Socket.io server arbitrary functions via io.use() that are run when a socket is created. Check out this example: var srv = require('http').createServer(); var io = require('sock

Manager#timeout

Manager#timeout(v:Boolean):Manager Sets the timeout option, or returns it if no parameters are passed.

Manager#reconnectionDelayMax

Manager#reconnectionDelayMax(v:Boolean):Manager Sets the reconectionDelayMax option, or returns it if no parameters are passed.

Manager#reconnectionDelay

Manager#reconnectionDelay(v:Boolean):Manager Sets the reconectionDelay option, or returns it if no parameters are passed.

Manager#reconnectionAttempts

Manager#reconnectionAttempts(v:Boolean):Manager Sets the reconnectionAttempts option, or returns it if no parameters are passed.

Manager#reconnection

Manager#reconnection(v:Boolean):Manager Sets the reconnection option, or returns it if no parameters are passed.

Manager

Manager(url:String, opts:Object) A Manager represents a connection to a given Socket.IO server. One or more Socket instances are associated with the manager. The manager can be accessed through the io property of each Socket instance. The opts are also passed to engine.io upon initialization of the underlying Socket. Options: – reconnection whether to reconnect automatically (true) – reconnectionDelay how long to wait before attempting a new reconnection (1000) – reconnectionDelayMax maximum am

Logging and Debugging

Socket.IO is now completely instrumented by a minimalistic yet tremendously powerful utility called debug by TJ Holowaychuk. Before 1.0, the Socket.IO server would default to logging everything out to the console. This turned out to be annoyingly verbose for many users (although extremely useful for others), so now we default to being completely silent by default. The basic idea is that each module used by Socket.IO provides different debugging scopes that give you insight into the internals. B

IO#Socket

IO#Socket Reference to the Socket constructor.