summaryrefslogtreecommitdiff
path: root/lib/dgram.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/dgram.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/dgram.js')
-rw-r--r--lib/dgram.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dgram.js b/lib/dgram.js
index 5d207a5ef6..eaf84272d1 100644
--- a/lib/dgram.js
+++ b/lib/dgram.js
@@ -3,7 +3,7 @@
const assert = require('assert');
const Buffer = require('buffer').Buffer;
const util = require('util');
-const events = require('events');
+const EventEmitter = require('events');
const constants = require('constants');
const UDP = process.binding('udp_wrap').UDP;
@@ -79,7 +79,7 @@ exports._createSocketHandle = function(address, port, addressType, fd, flags) {
function Socket(type, listener) {
- events.EventEmitter.call(this);
+ EventEmitter.call(this);
if (typeof type === 'object') {
var options = type;
@@ -101,7 +101,7 @@ function Socket(type, listener) {
if (typeof listener === 'function')
this.on('message', listener);
}
-util.inherits(Socket, events.EventEmitter);
+util.inherits(Socket, EventEmitter);
exports.Socket = Socket;