remove net.Stream references from client

This commit is contained in:
brianc 2011-02-04 20:05:02 -06:00
parent 0732ee215f
commit 5496f3199e

View File

@ -1,11 +1,10 @@
var sys = require('sys'); var sys = require('sys');
var net = require('net');
var crypto = require('crypto'); var crypto = require('crypto');
var EventEmitter = require('events').EventEmitter; var EventEmitter = require('events').EventEmitter;
var url = require('url'); var url = require('url');
var Query = require(__dirname + '/query'); var Query = require(__dirname + '/query');
var utils = require(__dirname + '/utils'); var utils = require(__dirname + '/utils');
var defaults = require(__dirname + '/defaults'); var defaults = require(__dirname + '/defaults');
var Connection = require(__dirname + '/connection'); var Connection = require(__dirname + '/connection');
@ -30,7 +29,7 @@ var Client = function(config) {
this.port = config.port || defaults.port; this.port = config.port || defaults.port;
this.host = config.host || defaults.host; this.host = config.host || defaults.host;
this.queryQueue = []; this.queryQueue = [];
this.connection = config.connection || new Connection({stream: config.stream || new net.Stream()}); this.connection = config.connection || new Connection({stream: config.stream});
this.queryQueue = []; this.queryQueue = [];
this.password = config.password || defaults.password; this.password = config.password || defaults.password;
this.encoding = 'utf8'; this.encoding = 'utf8';