Message6409

Author amak
Recipients amak, xjyvb3
Date 2011-02-26.20:49:31
SpamBayes Score 3.2695846e-11
Marked as misclassified No
Message-id <1298753372.07.0.575675982551.issue1711@psf.upfronthosting.co.za>
In-reply-to
Content
Here is the same code in jython, but using the Java APIs directly, with no involvement from the jython socket module.

>>> import java
>>> ipv6_addr = java.net.InetSocketAddress("::1", 9999)
>>> s = java.nio.channels.SocketChannel.open()
>>> s.socket().connect(ipv6_addr)

Which I think will result in something like this on your system

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
        at sun.nio.ch.Net.connect(Native Method)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
        at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:81)
        at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:65)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)

java.net.SocketException: java.net.SocketException: Address family not supported by protocol family:
 connect
History
Date User Action Args
2011-02-26 20:49:32amaksetmessageid: <1298753372.07.0.575675982551.issue1711@psf.upfronthosting.co.za>
2011-02-26 20:49:32amaksetrecipients: + amak, xjyvb3
2011-02-26 20:49:32amaklinkissue1711 messages
2011-02-26 20:49:31amakcreate