Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor (socket, networks, connectInfo) {
if (!isDuplex(socket)) {
throw new Error('socket must be a duplex stream')
}
super()
this.error = this.error.bind(this)
this.connectInfo = connectInfo
this.networks = networks
this.candidates = {}
this.closed = false
this.ready = false
this.connected = {}
this.remoteNetworks = null
this.remoteConnectInfo = null
this.socket = socket