From d411dec5a45ee6a0736504bd2df9d19df7ab35f2 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sun, 23 Dec 2012 23:18:01 -0300 Subject: [PATCH] index: rename `adaptor` to `adapter` --- lib/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/index.js b/lib/index.js index 2531abb340..2696a76868 100644 --- a/lib/index.js +++ b/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; };