• (Number)

    The protocol revision number (currently: 5).

    The protocol defines the format of the packets exchanged between the client and the server. Both the client and the server must use the same revision in order to understand each other.

    io([url][, options])

    • options (Object)
    • Returns Socket

    Creates a new Manager for the given URL, and attempts to reuse an existing Manager for subsequent calls, unless the option is passed with false. Passing this option is the equivalent of passing "force new connection": true or forceNew: true.

    A new Socket instance is returned for the namespace specified by the pathname in the URL, defaulting to /. For example, if the url is http://localhost/users, a transport connection will be established to http://localhost and a Socket.IO connection will be established to .

    is the short version of:

    See new Manager(url[, options]) for the list of available options.

    See for more on the difference between the and query options.