@@ -68,32 +68,32 @@ const handleConversion = {
68
68
'net.Native' : {
69
69
simultaneousAccepts : true ,
70
70
71
- send : function ( message , handle , options ) {
71
+ send ( message , handle , options ) {
72
72
return handle ;
73
73
} ,
74
74
75
- got : function ( message , handle , emit ) {
75
+ got ( message , handle , emit ) {
76
76
emit ( handle ) ;
77
77
}
78
78
} ,
79
79
80
80
'net.Server' : {
81
81
simultaneousAccepts : true ,
82
82
83
- send : function ( message , server , options ) {
83
+ send ( message , server , options ) {
84
84
return server . _handle ;
85
85
} ,
86
86
87
- got : function ( message , handle , emit ) {
87
+ got ( message , handle , emit ) {
88
88
var server = new net . Server ( ) ;
89
- server . listen ( handle , function ( ) {
89
+ server . listen ( handle , ( ) => {
90
90
emit ( server ) ;
91
91
} ) ;
92
92
}
93
93
} ,
94
94
95
95
'net.Socket' : {
96
- send : function ( message , socket , options ) {
96
+ send ( message , socket , options ) {
97
97
if ( ! socket . _handle )
98
98
return ;
99
99
@@ -141,7 +141,7 @@ const handleConversion = {
141
141
return handle ;
142
142
} ,
143
143
144
- postSend : function ( message , handle , options , callback , target ) {
144
+ postSend ( message , handle , options , callback , target ) {
145
145
// Store the handle after successfully sending it, so it can be closed
146
146
// when the NODE_HANDLE_ACK is received. If the handle could not be sent,
147
147
// just close it.
@@ -159,7 +159,7 @@ const handleConversion = {
159
159
}
160
160
} ,
161
161
162
- got : function ( message , handle , emit ) {
162
+ got ( message , handle , emit ) {
163
163
var socket = new net . Socket ( {
164
164
handle : handle ,
165
165
readable : true ,
@@ -183,28 +183,28 @@ const handleConversion = {
183
183
'dgram.Native' : {
184
184
simultaneousAccepts : false ,
185
185
186
- send : function ( message , handle , options ) {
186
+ send ( message , handle , options ) {
187
187
return handle ;
188
188
} ,
189
189
190
- got : function ( message , handle , emit ) {
190
+ got ( message , handle , emit ) {
191
191
emit ( handle ) ;
192
192
}
193
193
} ,
194
194
195
195
'dgram.Socket' : {
196
196
simultaneousAccepts : false ,
197
197
198
- send : function ( message , socket , options ) {
198
+ send ( message , socket , options ) {
199
199
message . dgramType = socket . type ;
200
200
201
201
return socket [ kStateSymbol ] . handle ;
202
202
} ,
203
203
204
- got : function ( message , handle , emit ) {
204
+ got ( message , handle , emit ) {
205
205
var socket = new dgram . Socket ( message . dgramType ) ;
206
206
207
- socket . bind ( handle , function ( ) {
207
+ socket . bind ( handle , ( ) => {
208
208
emit ( socket ) ;
209
209
} ) ;
210
210
}
@@ -618,7 +618,7 @@ function setupChannel(target, channel) {
618
618
}
619
619
620
620
// Convert handle object
621
- obj . got . call ( this , message , handle , function ( handle ) {
621
+ obj . got . call ( this , message , handle , ( handle ) => {
622
622
handleMessage ( message . msg , handle , isInternal ( message . msg ) ) ;
623
623
} ) ;
624
624
} ) ;
@@ -740,7 +740,7 @@ function setupChannel(target, channel) {
740
740
}
741
741
742
742
if ( wasAsyncWrite ) {
743
- req . oncomplete = function ( ) {
743
+ req . oncomplete = ( ) => {
744
744
control . unref ( ) ;
745
745
if ( typeof callback === 'function' )
746
746
callback ( null ) ;
@@ -877,7 +877,7 @@ function _validateStdio(stdio, sync) {
877
877
878
878
// Translate stdio into C++-readable form
879
879
// (i.e. PipeWraps or fds)
880
- stdio = stdio . reduce ( function ( acc , stdio , i ) {
880
+ stdio = stdio . reduce ( ( acc , stdio , i ) => {
881
881
function cleanup ( ) {
882
882
for ( var i = 0 ; i < acc . length ; i ++ ) {
883
883
if ( ( acc [ i ] . type === 'pipe' || acc [ i ] . type === 'ipc' ) && acc [ i ] . handle )
0 commit comments