File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 20
20
21
21
// ## Helpers to handle frames, and do parsing
22
22
23
- var net = require ( 'net' ) ,
23
+ var events = require ( 'events' ) ,
24
+ net = require ( 'net' ) ,
24
25
tls = require ( 'tls' ) ,
25
26
sys = require ( 'util' ) ,
27
+ util = require ( 'util' ) ,
26
28
frame = require ( './frame' ) ,
27
29
stomp_utils = require ( './stomp-utils' ) ,
28
30
exceptions = require ( './stomp-exceptions' ) ,
@@ -245,6 +247,8 @@ function send_frame(stomp, _frame) {
245
247
// Takes an argument object
246
248
//
247
249
function Stomp ( args ) {
250
+ events . EventEmitter . call ( this ) ;
251
+
248
252
this . port = args [ 'port' ] || 61613 ;
249
253
this . host = args [ 'host' ] || '127.0.0.1' ;
250
254
this . debug = args [ 'debug' ] ;
@@ -263,7 +267,7 @@ function Stomp(args) {
263
267
} ;
264
268
265
269
// ## Stomp is an EventEmitter
266
- Stomp . prototype = new process . EventEmitter ( ) ;
270
+ util . inherits ( Stomp , events . EventEmitter ) ;
267
271
268
272
// ## Stomp.connect()
269
273
//
You can’t perform that action at this time.
0 commit comments