Issue1043

classification
Title: Special broadcast host address is not supported.
Type: Severity: normal
Components: Library Versions: 2.2.2
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amak Nosy List: amak
Priority: normal Keywords:

Created on 2008-06-01.22:47:30 by amak, last changed 2009-01-29.21:00:41 by amak.

Files
File name Uploaded Description Edit Remove
Client.java amak, 2008-12-19.14:30:02 Clien side of UDP broadcast
Server2.java amak, 2008-12-19.14:30:39
Messages
msg3213 (view) Author: Alan Kennedy (amak) Date: 2008-06-01.22:47:29
There is a special host address string "<broadcast>", as used by
cpython, is not supported on jython.

Although support for the SO_BROADCAST flag on UDP sockets is supported,
broadcast support may not be available in a portable way until the
"<broadcast>" address is supported.
msg3292 (view) Author: Alan Kennedy (amak) Date: 2008-06-19.13:38:13
This is quite a complex subject, because both cpython and java behave
differently for different bind addresses on different platforms.

Here are some links which discuss the topic

Java
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212324
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4191980
http://bugs.sun.com/view_bug.do?bug_id=6579726
http://mail.openjdk.java.net/pipermail/net-dev/2008-February/000138.html

Cpython
http://mail.python.org/pipermail/python-list/2003-February/189535.html
http://mail.python.org/pipermail/python-list/2003-April/201645.html
http://mail.python.org/pipermail/python-list/2007-April/434587.html
http://mail.python.org/pipermail/python-dev/2006-May/065443.html

So, I'm going to have to do a lot of experimentation to see what the
recommended approach is for implementing broadcast on jython.

More soon.
msg3968 (view) Author: Alan Kennedy (amak) Date: 2008-12-19.14:30:02
Adding the client side of some java code that I've been experimenting with.
msg3969 (view) Author: Alan Kennedy (amak) Date: 2008-12-19.14:30:39
Adding the server side of some java code I've been experimenting with.
msg3970 (view) Author: Alan Kennedy (amak) Date: 2008-12-19.17:05:32
Fix checked in at r5782.
Note that when bind to UDP broadcast endpoints, the host constant "" or
socket.INADDR_ANY should be used.
When sendto'ing broadcast endpoints, the host constant "<broadcast>" or
socket.INADDR_BROADCAST should be used.
msg4108 (view) Author: Alan Kennedy (amak) Date: 2009-01-29.21:00:41
Also checked the fix for this into release 2.2 maint at r6002.
History
Date User Action Args
2009-01-29 21:00:41amaksetmessages: + msg4108
2008-12-19 17:05:32amaksetstatus: open -> closed
resolution: fixed
messages: + msg3970
2008-12-19 14:30:40amaksetfiles: + Server2.java
messages: + msg3969
2008-12-19 14:30:03amaksetfiles: + Client.java
messages: + msg3968
2008-12-17 19:52:10fwierzbickisetpriority: normal
2008-06-19 13:38:14amaksetmessages: + msg3292
2008-06-01 22:47:30amakcreate