net.Socket(fd) should start readable and writable

This commit is contained in:
Ryan Dahl 2011-09-15 13:35:24 -07:00
Родитель 763059ee09
Коммит 5cb1fd2e32
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -89,6 +89,7 @@ function Socket(options) {
// console.trace();
this._handle = createPipe();
this._handle.open(fd);
this.readable = this.writable = true;
initSocketHandle(this);
} else {
// private

Просмотреть файл

@ -25,6 +25,10 @@
var common = require('../common');
var assert = require('assert');
assert.ok(process.stdout.writable);
assert.ok(process.stderr.writable);
var stdout_write = global.process.stdout.write;
var strings = [];
global.process.stdout.write = function(string) {