aboutsummaryrefslogtreecommitdiff
path: root/lib/net.js
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-09-17 04:15:29 +0530
committerSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-09-23 00:23:08 +0530
commitf32a606e373ad57f684b0e511d6d6e4cbd48a812 (patch)
treed105e35eb96b6e4d1b64565e3ef94406563c296a /lib/net.js
parent7953c83b85018a92475e186d2fd97c79e69a508f (diff)
downloadandroid-node-v8-f32a606e373ad57f684b0e511d6d6e4cbd48a812.tar.gz
android-node-v8-f32a606e373ad57f684b0e511d6d6e4cbd48a812.tar.bz2
android-node-v8-f32a606e373ad57f684b0e511d6d6e4cbd48a812.zip
lib,src: remove usage of events.EventEmitter
The `events` module already exports `EventEmitter` constructor function So, we don't have to use `events.EventEmitter` to access it. Refer: https://github.com/nodejs/node/pull/2896 PR-URL: https://github.com/nodejs/node/pull/2921 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'lib/net.js')
-rw-r--r--lib/net.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net.js b/lib/net.js
index 8245601e51..47422c30db 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -1,6 +1,6 @@
'use strict';
-const events = require('events');
+const EventEmitter = require('events');
const stream = require('stream');
const timers = require('timers');
const util = require('util');
@@ -1071,7 +1071,7 @@ function Server(options, connectionListener) {
if (!(this instanceof Server))
return new Server(options, connectionListener);
- events.EventEmitter.call(this);
+ EventEmitter.call(this);
var self = this;
var options;
@@ -1113,7 +1113,7 @@ function Server(options, connectionListener) {
this.allowHalfOpen = options.allowHalfOpen || false;
this.pauseOnConnect = !!options.pauseOnConnect;
}
-util.inherits(Server, events.EventEmitter);
+util.inherits(Server, EventEmitter);
exports.Server = Server;