Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

net: support Server.listen(Pipe)

  • Loading branch information...
commit 1ae1a508505138a93cf90cd067b20eda8fc78405 1 parent 831d137
@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) {

1 comment on commit 1ae1a50

@isaacs

@bnoordhuis Do you see any reason why this can't go into v0.8? I think it was always the intent to support this anyway. (Just this one commit, of course, not the whole pull req.)

Please sign in to comment.
Something went wrong with that request. Please try again.