Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Handle.prototype.assignSocket = function assignSocket (socket, options) {
var state = this._spdyState
state.socket = socket
state.deceiver = httpDeceiver.create(socket, options)
function onStreamError (err) {
state.socket.emit('error', err)
}
this.getStream(function (stream) {
stream.on('error', onStreamError)
})
}
Handle.prototype.assignSocket = function assignSocket (socket, options) {
var state = this._spdyState
state.socket = socket
state.deceiver = httpDeceiver.create(socket, options)
function onStreamError (err) {
state.socket.emit('error', err)
}
this.getStream(function (stream) {
stream.on('error', onStreamError)
})
}