|
From: Julien D. <ju...@jd...> - 2015-05-20 05:35:45
|
Hi,
It seems one can't set TCP_NODELAY on a socket in Jython 2.7, on both
Windows and Linux. It works just fine on Jython 2.5.4rc1 on the same
JVM. Can others replicate this? Should I report the bug somewhere else?
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_79
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s = socket.socket(socket.AF_INET,socket.SOCK_STREAM,0)
>>> s.setsockopt(socket.SOL_TCP,socket.TCP_NODELAY,0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SOL_TCP'
>>> s.setsockopt(6,socket.TCP_NODELAY,0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/jython27/Lib/_socket.py", line 1367, in meth
return getattr(self._sock,name)(*args)
File "/usr/local/jython27/Lib/_socket.py", line 357, in handle_exception
return method_or_function(*args, **kwargs)
File "/usr/local/jython27/Lib/_socket.py", line 357, in handle_exception
return method_or_function(*args, **kwargs)
File "/usr/local/jython27/Lib/_socket.py", line 1204, in setsockopt
raise error(errno.ENOPROTOOPT, "Protocol not available")
_socket.error: [Errno 92] Protocol not available
By the way, thanks to the developers for the great work of releasing 2.7.
Julien
|