File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
const turbo = require ( '../' )
2
2
3
3
const server = turbo . createServer ( function ( socket ) {
4
- console . log ( socket . connection . remoteAddress , socket . connection . remotePort )
4
+ console . log ( socket . remoteFamily , socket . remoteAddress , socket . remotePort )
5
5
6
6
socket . close ( )
7
7
} )
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ class Connection extends events.EventEmitter {
14
14
this . finished = false
15
15
this . ended = false
16
16
this . allowHalfOpen = false
17
- this . connection = { remoteAddress : '' , remotePort : 0 }
17
+ this . remoteFamily = ''
18
+ this . remoteAddress = ''
19
+ this . remotePort = 0
18
20
this . writable = false
19
21
this . readable = false
20
22
@@ -95,8 +97,9 @@ class Connection extends events.EventEmitter {
95
97
return
96
98
}
97
99
98
- this . connection . remoteAddress = binding . turbo_net_tcp_address ( this . _handle )
99
- this . connection . remotePort = binding . turbo_net_tcp_port ( this . _handle )
100
+ this . remoteFamily = 'IPv4'
101
+ this . remoteAddress = binding . turbo_net_tcp_address ( this . _handle )
102
+ this . remotePort = binding . turbo_net_tcp_port ( this . _handle )
100
103
101
104
this . readable = true
102
105
this . writable = true
You can’t perform that action at this time.
0 commit comments