Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

net: support Server.listen(Pipe)

  • Loading branch information...
commit 3d0b709eadda89903ecf6f2d9808f55831715da5 1 parent 6ce98d9
@AndreasMadsen authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/net.js
View
3  lib/net.js
@@ -970,6 +970,7 @@ Server.prototype._listen = function() {
var backlog = toNumber(arguments[1]) || toNumber(arguments[2]);
var TCP = process.binding('tcp_wrap').TCP;
+ var Pipe = process.binding('pipe_wrap').Pipe;
if (arguments.length == 0 || typeof arguments[0] == 'function') {
// Don't bind(). OS will assign a port with INADDR_ANY.
@@ -983,7 +984,7 @@ Server.prototype._listen = function() {
} else if (h.handle) {
h = h.handle;
}
- if (h instanceof TCP) {
+ if (h instanceof TCP || h instanceof Pipe) {
self._handle = h;
listen(self, null, -1, -1, backlog);
} else if (h.fd && typeof h.fd === 'number' && h.fd >= 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.