Node.js: What HTTP exceptions can it throw? -
i have simple server
http.createserver(function(request, response) { response.writehead(200); response.end("hello world"); }).listen(8080);
what exceptions can throw except listen eaddrinuse
?
can thow error if user disconnects in middle of request sending? or this?
it not throw exception in such scenario disconnected client - 'normal' behaviour.
the eaddrinuse exception thrown @ moment of calling http.createserver
, tries create socket , fail in case if port in use.
while events talking, behind scenes stuff, client disconnects, or timeouts, or similar. events happening asynchronously , why can't thrown node.js execution in middle of nowhere.
you still have events request self, , have subscribe them, here answer covers need: node.js http server, detect when clients disconnect
Comments
Post a Comment