index: rename adaptor to adapter

This commit is contained in:
Guillermo Rauch
2012-12-23 23:18:01 -03:00
parent ab5a226f3e
commit d411dec5a4

View File

@@ -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;
};