@@ -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
}
@@ -617,7 +617,7 @@ function setupChannel(target, channel) {
617
617
}
618
618
619
619
// Convert handle object
620
- obj . got . call ( this , message , handle , function ( handle ) {
620
+ obj . got . call ( this , message , handle , ( handle ) => {
621
621
handleMessage ( message . msg , handle , isInternal ( message . msg ) ) ;
622
622
} ) ;
623
623
} ) ;
@@ -739,7 +739,7 @@ function setupChannel(target, channel) {
739
739
}
740
740
741
741
if ( wasAsyncWrite ) {
742
- req . oncomplete = function ( ) {
742
+ req . oncomplete = ( ) => {
743
743
control . unref ( ) ;
744
744
if ( typeof callback === 'function' )
745
745
callback ( null ) ;
@@ -876,7 +876,7 @@ function _validateStdio(stdio, sync) {
876
876
877
877
// Translate stdio into C++-readable form
878
878
// (i.e. PipeWraps or fds)
879
- stdio = stdio . reduce ( function ( acc , stdio , i ) {
879
+ stdio = stdio . reduce ( ( acc , stdio , i ) => {
880
880
function cleanup ( ) {
881
881
for ( var i = 0 ; i < acc . length ; i ++ ) {
882
882
if ( ( acc [ i ] . type === 'pipe' || acc [ i ] . type === 'ipc' ) && acc [ i ] . handle )
0 commit comments