stub out missing net.js apis

This commit is contained in:
Andy Prock 2015-12-31 13:40:43 -08:00
parent 0b9c8f3464
commit 5c284e5622
2 changed files with 12 additions and 0 deletions

View File

@ -101,4 +101,7 @@ TcpServer.prototype.close = function(callback: ?() => void) {
this._socket.end(); this._socket.end();
}; };
// unimplemented net.Server apis
TcpServer.prototype.ref = TcpServer.prototype.unref = function() { /* nop */ };
module.exports = TcpServer; module.exports = TcpServer;

View File

@ -339,4 +339,13 @@ TcpSocket.prototype._normalizeConnectArgs = function(args) {
return typeof cb === 'function' ? [options, cb] : [options]; return typeof cb === 'function' ? [options, cb] : [options];
}; };
// unimplemented net.Socket apis
TcpSocket.prototype.pause =
TcpSocket.prototype.resume =
TcpSocket.prototype.ref =
TcpSocket.prototype.unref =
TcpSocket.prototype.setNoDelay =
TcpSocket.prototype.setKeepAlive =
TcpSocket.prototype.setEncoding = function() { /* nop */ };
module.exports = TcpSocket; module.exports = TcpSocket;