Socket#client

Socket#client:Client A reference to the underlying Client object.

Socket

Socket A Socket is the fundamental class for interacting with browser clients. A Socket belongs to a certain Namespace (by default /) and uses an underlying Client to communicate.

Socket

Socket Events connect. Fired upon connecting. error. Fired upon a connection error Parameters: Object error data disconnect. Fired upon a disconnection. reconnect. Fired upon a successful reconnection. Parameters: Number reconnection attempt number reconnect_attempt. Fired upon an attempt to reconnect. reconnecting. Fired upon an attempt to reconnect. Parameters: Number reconnection attempt number reconnect_error. Fired upon a reconnection attempt error. Parameters: Object error o

Server#use

Server#use See Namespace#use below.

Server#sockets

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

Server#serveClient

Server#serveClient(v:Boolean):Server If v is true the attached server (see Server#attach) will serve the client files. Defaults to true. This method has no effect after attach is called. // pass a server and the `serveClient` option var io = require('socket.io')(http, { serveClient: false }); // or pass no server and then you can call the method var io = require('socket.io')(); io.serveClient(false); io.attach(http); If no arguments are supplied this method returns the current value.

Server#path

Server#path(v:String):Server Sets the path v under which engine.io and the static files will be served. Defaults to /socket.io. If no arguments are supplied this method returns the current value.

Server#origins

Server#origins(v:String):Server Sets the allowed origins v. Defaults to any origins being allowed. If no arguments are supplied this method returns the current value.

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.

Server#of

Server#of(nsp:String):Namespace Initializes and retrieves the given Namespace by its pathname identifier nsp. If the namespace was already initialized it returns it right away.