Server#attach

Server#attach(srv:http#Server, opts:Object):Server Attaches the Server to an engine.io instance on srv with the supplied opts (optionally).

Server#emit

Server#emit Emits an event to all connected clients. The following two are equivalent: var io = require('socket.io')(); io.sockets.emit('an event sent to all connected clients'); io.emit('an event sent to all connected clients'); For other available methods, see Namespace below.

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

Manager#timeout

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

Server#onconnection

Server#onconnection(socket:engine#Socket):Server Advanced use only. Creates a new socket.io client from the incoming engine.io (or compatible API) socket.

IO

IO(url:String, opts:Object):Socket Exposed as the io global in window if using the standalone build (eg: /socket.io/socket.io.js or the CDN), or the result of calling require('socket.io-client'). When called, it creates a new Manager for the given URL, and attempts to reuse an existing Manager for subsequent calls, unless the multiplex option is passed with false. Passing this option is the equivalent of passing 'force new connection': true. The rest of the options are passed to the Manager con

Server#sockets

Server#sockets:Namespace The default (/) namespace.