Message7168
There's a couple of aspects to this.
First of all, the jython socket module is defaulting to AF_INET, when it should really be defaulting to AF_UNSPEC, which will return both
IPv4 and IPv6 addresses. I.e. the signature of the function looks like this
def getaddrinfo(host, port, family=AF_INET, socktype=None, proto=0, flags=0):
and should look like this
def getaddrinfo(host, port, family=AF_UNSPEC, socktype=None, proto=0, flags=0):
I will fix this.
Also what needs to be fixed is returning all possible socket types and protocols, if they are not specified. I will fix this.
Even when the above two fixes are done, you will still not get the 6 results that cpython gives, because it has returned a SOCK_RAW address_info to you: java, and thus jython, does not support SOCK_RAW sockets.
And lastly, there are JVM options that control whether or not the address lookup calls return IPv4 or IPv6, which I will have to document, since they can also have a bearing on what results are returned from java.net.InetAddress.getAllByName()
I will check in these fixes, to 2.5 and 2.7, at the weekend. |
|
Date |
User |
Action |
Args |
2012-05-29 22:09:40 | amak | set | messageid: <1338329380.31.0.934171399625.issue1895@psf.upfronthosting.co.za> |
2012-05-29 22:09:40 | amak | set | recipients:
+ amak, oscar |
2012-05-29 22:09:40 | amak | link | issue1895 messages |
2012-05-29 22:09:39 | amak | create | |
|