Add ability to pass proxy
This commit is contained in:
parent
df60282042
commit
ffc27f9942
|
@ -31,8 +31,12 @@ var Driver = module.exports = function Driver(opts) {
|
||||||
|
|
||||||
Utils.subclass(Driver, Basestar);
|
Utils.subclass(Driver, Basestar);
|
||||||
|
|
||||||
Driver.prototype.setupCommands = function(commands) {
|
Driver.prototype.setupCommands = function(commands, proxy) {
|
||||||
this.proxyMethods(commands, this.connection, this);
|
if (proxy == null) {
|
||||||
|
proxy = this.connection;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.proxyMethods(commands, proxy, this);
|
||||||
|
|
||||||
for (var i = 0; i < commands.length; i++) {
|
for (var i = 0; i < commands.length; i++) {
|
||||||
var command = commands[i];
|
var command = commands[i];
|
||||||
|
|
Loading…
Reference in New Issue