This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TCP = process.binding("tcp_wrap").TCP; | |
var Buffer = process.binding("buffer").SlowBuffer; | |
var HTTPParser = process.binding("http_parser").HTTPParser; | |
function setupSocket(peer) { | |
function shutdownHandler(status, handle, req) { | |
// TODO: ensure we only shutdown once | |
if(status != 0) { | |
if(peer.onerror) { | |
var err = new Error("shutdown"); |
NewerOlder