Issue2265

classification
Title: Support UNIX sockets
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Milestone:
process
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: jeff.allen, sdough, zyasoft
Priority: normal Keywords:

Created on 2015-02-06.22:14:50 by sdough, last changed 2018-03-07.08:47:32 by jeff.allen.

Messages
msg9487 (view) Author: Steve Dougherty (sdough) Date: 2015-02-06.22:14:49
I'm running Jython 2.7b3 (default:e81256215fb0, Aug 4 2014, 02:39:51) with [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_75 on Arch Linux with kernel 3.18.5-1.

>>> import socket
>>> socket.AF_UNIX

gives

AttributeError: 'module' object has no attribute 'AF_UNIX'

and the [documentation](http://www.jython.org/docs/library/socket.html) notes "If the AF_UNIX constant is not defined then this protocol is unsupported."

CPython 2.7 and 3.4 support it on this system, so does this mean AF_UNIX support unimplemented on all systems?
msg9490 (view) Author: Jim Baker (zyasoft) Date: 2015-02-07.01:24:33
Unix domain sockets are not currently implemented in Netty, which is what Jython now uses. However, it may be supported in the future:
https://groups.google.com/forum/#!topic/netty/d42qul6zNu8

They would be very useful.
msg9611 (view) Author: Jim Baker (zyasoft) Date: 2015-03-10.18:36:38
Unix domain sockets are now available with the latest version of Netty, so we can start exploring this issue. But at 2.7.1 at the earliest.
msg11751 (view) Author: Jeff Allen (jeff.allen) Date: 2018-03-06.19:50:33
We must've updated netty since the last post here. A quick test on Windows gives me the same result, but then it might well do that.
msg11753 (view) Author: Steve Dougherty (sdough) Date: 2018-03-06.20:07:10
It doesn't seem specific to Windows; I see the same behavior with Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43) with [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_162 and Arch Linux with kernel 4.15.6-1.
msg11757 (view) Author: Jeff Allen (jeff.allen) Date: 2018-03-07.08:47:32
I meant that AF_UNIX might well continue to be unavailable(*) on Windows even when it worked on Linux. Thanks for the more recent data point from there.

(*) Looking it up, I find I'm almost wrong, but not quite. (https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/).
History
Date User Action Args
2018-03-07 08:47:32jeff.allensetpriority: low -> normal
messages: + msg11757
2018-03-06 20:07:11sdoughsetmessages: + msg11753
2018-03-06 19:50:33jeff.allensetnosy: + jeff.allen
messages: + msg11751
milestone: Jython 2.7.2 ->
2015-10-29 22:28:10zyasoftsetmilestone: Jython 2.7.1 -> Jython 2.7.2
2015-07-28 15:36:58zyasoftsetassignee: zyasoft
milestone: Jython 2.7.1
2015-03-10 18:36:39zyasoftsetmessages: + msg9611
2015-02-07 01:24:34zyasoftsetpriority: low
resolution: accepted
messages: + msg9490
nosy: + zyasoft
2015-02-06 22:14:50sdoughcreate