Message8521
Netty4 is strange... you can bind its ServerBootstrap with an Inet4Address, but when you query the Channel it returns for its local address, you get an Inet6Address!
Here's a print-peppered _realsocket.listen() method:
def listen(self, backlog):
# ...
print 'Binding to {:s} with type {:s}'.format(repr(self.bind_addr.getAddress()), type(self.bind_addr.getAddress()))
future = b.bind(self.bind_addr.getAddress(), self.bind_addr.getPort())
# ...
self.channel = future.channel()
localaddr = self.channel.localAddress()
print 'The channel is bound to {:s} with type {:s}'.format(repr(localaddr.getAddress()), type(localaddr.getAddress()))
# ...
And what you get when you execute that modified method:
Binding to /0.0.0.0 with type <type 'java.net.Inet4Address'>
The channel is bound to /0:0:0:0:0:0:0:0 with type <type 'java.net.Inet6Address'>
And that's why you get an IPv6 '0' address from getsockname() after binding it with IPv4 '0' address. |
|
Date |
User |
Action |
Args |
2014-05-22 00:35:59 | santa4nt | set | messageid: <1400718959.37.0.830301332683.issue2078@psf.upfronthosting.co.za> |
2014-05-22 00:35:59 | santa4nt | set | recipients:
+ santa4nt, amak, irmen, zyasoft |
2014-05-22 00:35:59 | santa4nt | link | issue2078 messages |
2014-05-22 00:35:58 | santa4nt | create | |
|