mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-08 03:00:20 -04:00
index: rename adaptor to adapter
This commit is contained in:
18
lib/index.js
18
lib/index.js
@@ -9,7 +9,7 @@ var http = require('http')
|
||||
, engine = require('engine.io')
|
||||
, Client = require('./client')
|
||||
, Namespace = require('./namespace')
|
||||
, Adaptor = require('./adaptor')
|
||||
, Adapter = require('./adapter')
|
||||
, debug = require('debug')('socket.io:server');
|
||||
|
||||
/**
|
||||
@@ -43,10 +43,10 @@ function Server(srv, opts){
|
||||
}
|
||||
opts = opts || {};
|
||||
this.nsps = {};
|
||||
this.sockets = this.of('/');
|
||||
this.path(opts.path || '/socket.io');
|
||||
this.static(false !== opts.static);
|
||||
this.adaptor(opts.adaptor || new Adaptor);
|
||||
this.adapter(opts.adapter || Adapter);
|
||||
this.sockets = this.of('/');
|
||||
if (srv) this.attach(srv, opts);
|
||||
}
|
||||
|
||||
@@ -79,16 +79,16 @@ Server.prototype.path = function(v){
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the adaptor for rooms.
|
||||
* Sets the edaptor for rooms.
|
||||
*
|
||||
* @param {Adaptor} pathname
|
||||
* @return {Server|Adaptor} self when setting or value when getting
|
||||
* @param {Adapter} pathname
|
||||
* @return {Server|Adapter} self when setting or value when getting
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Server.prototype.adaptor = function(v){
|
||||
if (!arguments.length) return this._adaptor;
|
||||
this._adaptor = v;
|
||||
Server.prototype.adapter = function(v){
|
||||
if (!arguments.length) return this._adapter;
|
||||
this._adapter = v;
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user