diff --git a/lib/http.js b/lib/http.js index 6931a0e26c138a..0ef1be6d57548f 100644 --- a/lib/http.js +++ b/lib/http.js @@ -19,6 +19,16 @@ exports.createServer = function createServer(requestListener) { return new Server(requestListener); }; +exports.createServerListener = function createServerListener(listener,port,statusCallback) +{ + if(port) + return new Server(listener).listen(port); + else if(port && statusCallback) + return new Server(listener).listen(port,statusCallback); + else + return new Server(listener); +} + const client = require('_http_client'); const ClientRequest = exports.ClientRequest = client.ClientRequest;