@@ -62,32 +62,32 @@ const handleConversion = {
62
62
'net.Native' : {
63
63
simultaneousAccepts : true ,
64
64
65
- send : function ( message , handle , options ) {
65
+ send ( message , handle , options ) {
66
66
return handle ;
67
67
} ,
68
68
69
- got : function ( message , handle , emit ) {
69
+ got ( message , handle , emit ) {
70
70
emit ( handle ) ;
71
71
}
72
72
} ,
73
73
74
74
'net.Server' : {
75
75
simultaneousAccepts : true ,
76
76
77
- send : function ( message , server , options ) {
77
+ send ( message , server , options ) {
78
78
return server . _handle ;
79
79
} ,
80
80
81
- got : function ( message , handle , emit ) {
81
+ got ( message , handle , emit ) {
82
82
var server = new net . Server ( ) ;
83
- server . listen ( handle , function ( ) {
83
+ server . listen ( handle , ( ) => {
84
84
emit ( server ) ;
85
85
} ) ;
86
86
}
87
87
} ,
88
88
89
89
'net.Socket' : {
90
- send : function ( message , socket , options ) {
90
+ send ( message , socket , options ) {
91
91
if ( ! socket . _handle )
92
92
return ;
93
93
@@ -135,7 +135,7 @@ const handleConversion = {
135
135
return handle ;
136
136
} ,
137
137
138
- postSend : function ( message , handle , options , callback , target ) {
138
+ postSend ( message , handle , options , callback , target ) {
139
139
// Store the handle after successfully sending it, so it can be closed
140
140
// when the NODE_HANDLE_ACK is received. If the handle could not be sent,
141
141
// just close it.
@@ -153,7 +153,7 @@ const handleConversion = {
153
153
}
154
154
} ,
155
155
156
- got : function ( message , handle , emit ) {
156
+ got ( message , handle , emit ) {
157
157
var socket = new net . Socket ( {
158
158
handle : handle ,
159
159
readable : true ,
@@ -177,28 +177,28 @@ const handleConversion = {
177
177
'dgram.Native' : {
178
178
simultaneousAccepts : false ,
179
179
180
- send : function ( message , handle , options ) {
180
+ send ( message , handle , options ) {
181
181
return handle ;
182
182
} ,
183
183
184
- got : function ( message , handle , emit ) {
184
+ got ( message , handle , emit ) {
185
185
emit ( handle ) ;
186
186
}
187
187
} ,
188
188
189
189
'dgram.Socket' : {
190
190
simultaneousAccepts : false ,
191
191
192
- send : function ( message , socket , options ) {
192
+ send ( message , socket , options ) {
193
193
message . dgramType = socket . type ;
194
194
195
195
return socket [ kStateSymbol ] . handle ;
196
196
} ,
197
197
198
- got : function ( message , handle , emit ) {
198
+ got ( message , handle , emit ) {
199
199
var socket = new dgram . Socket ( message . dgramType ) ;
200
200
201
- socket . bind ( handle , function ( ) {
201
+ socket . bind ( handle , ( ) => {
202
202
emit ( socket ) ;
203
203
} ) ;
204
204
}
@@ -610,7 +610,7 @@ function setupChannel(target, channel) {
610
610
}
611
611
612
612
// Convert handle object
613
- obj . got . call ( this , message , handle , function ( handle ) {
613
+ obj . got . call ( this , message , handle , ( handle ) => {
614
614
handleMessage ( message . msg , handle , isInternal ( message . msg ) ) ;
615
615
} ) ;
616
616
} ) ;
@@ -732,7 +732,7 @@ function setupChannel(target, channel) {
732
732
}
733
733
734
734
if ( req . async ) {
735
- req . oncomplete = function ( ) {
735
+ req . oncomplete = ( ) => {
736
736
control . unref ( ) ;
737
737
if ( typeof callback === 'function' )
738
738
callback ( null ) ;
@@ -869,7 +869,7 @@ function _validateStdio(stdio, sync) {
869
869
870
870
// Translate stdio into C++-readable form
871
871
// (i.e. PipeWraps or fds)
872
- stdio = stdio . reduce ( function ( acc , stdio , i ) {
872
+ stdio = stdio . reduce ( ( acc , stdio , i ) => {
873
873
function cleanup ( ) {
874
874
for ( var i = 0 ; i < acc . length ; i ++ ) {
875
875
if ( ( acc [ i ] . type === 'pipe' || acc [ i ] . type === 'ipc' ) && acc [ i ] . handle )
0 commit comments