@@ -31,7 +31,7 @@ var net = require('net'),
31
31
32
32
function parse_command ( data ) {
33
33
var command ,
34
- this_string = data . toString ( 'utf8' , start = 0 , end = data . length ) ;
34
+ this_string = data . toString ( 'utf8' , 0 , data . length ) ;
35
35
command = this_string . split ( '\n' ) ;
36
36
return command [ 0 ] ;
37
37
} ;
@@ -70,9 +70,9 @@ function parse_frame(chunk) {
70
70
71
71
command = parse_command ( chunk ) ;
72
72
data = chunk . slice ( command . length + 1 , chunk . length ) ;
73
- data = data . toString ( 'utf8' , start = 0 , end = data . length ) ;
73
+ data = data . toString ( 'utf8' , 0 , data . length ) ;
74
74
75
- the_rest = data . split ( '\n\n' ) ;
75
+ var the_rest = data . split ( '\n\n' ) ;
76
76
headers = parse_headers ( the_rest [ 0 ] ) ;
77
77
body = the_rest . slice ( 1 , the_rest . length ) ;
78
78
@@ -301,7 +301,7 @@ Stomp.prototype.disconnect = function() {
301
301
*/
302
302
Stomp . prototype . subscribe = function ( headers ) {
303
303
var self = this ;
304
- destination = headers [ 'destination' ] ;
304
+ var destination = headers [ 'destination' ] ;
305
305
headers [ 'session' ] = self . session ;
306
306
send_command ( this , 'SUBSCRIBE' , headers ) ;
307
307
self . _subscribed_to [ destination ] = true ;
@@ -314,7 +314,7 @@ Stomp.prototype.subscribe = function(headers) {
314
314
*/
315
315
Stomp . prototype . unsubscribe = function ( headers ) {
316
316
var self = this ;
317
- destination = headers [ 'destination' ] ;
317
+ var destination = headers [ 'destination' ] ;
318
318
headers [ 'session' ] = self . session ;
319
319
send_command ( this , 'UNSUBSCRIBE' , headers ) ;
320
320
self . _subscribed_to [ destination ] = false ;
@@ -371,7 +371,7 @@ Stomp.prototype.abort = function(transaction_id) {
371
371
*/
372
372
Stomp . prototype . send = function ( headers , want_receipt ) {
373
373
var self = this ;
374
- destination = headers [ 'destination' ] ;
374
+ var destination = headers [ 'destination' ] ;
375
375
body = headers [ 'body' ] || null ;
376
376
delete headers [ 'body' ] ;
377
377
headers [ 'session' ] = self . session ;
0 commit comments