TCP_NODELAY in Jython 2.7: protocol not available
Julien Demoor <[email protected]>
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <[email protected]> |
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
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y