use net.Socket instead of net.Stream

`net.Stream` is a undocumented legacy naming from node 0.x
4ae320f2b3/lib/net.js (L1762)
This commit is contained in:
C. T. Lin 2018-03-14 22:43:52 +08:00 committed by GitHub
parent 50b1221e11
commit 875236fc0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ var BINARY_MODE = 1
var Connection = function (config) {
EventEmitter.call(this)
config = config || {}
this.stream = config.stream || new net.Stream()
this.stream = config.stream || new net.Socket()
this._keepAlive = config.keepAlive
this.lastBuffer = false
this.lastOffset = 0