classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Datagram sockets: SO_BROADCAST


From: Brian Jones
Subject: Re: Datagram sockets: SO_BROADCAST
Date: 21 Jul 2003 18:04:43 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

"Dr. Torsten Rupp" <address@hidden> writes:

> Dear Classpath members,
> 
> it seems the behaviour of the Classpath implementaiton of datagram
> sockets and sending broadcast messages is different from the
> implementation in the Sun JDK API. I detected that the Sun
> implementation set the socket option SO_BROADCAST for a datagram
> socket by default. Thus a broadcast message can be send via
> DatagramSocket.send(). With the current Classpath implementation
> I get an error code "permission denied" (after some tries, because
> all errors during a send()-call are mapped to an "internal error
> only" - which is not very useful). By adding
> setsockopt(...,SO_BROADCASST,...) in the function _javanet_create()
> is seems to run. Is this modification ok?

I think you can call _javanet_set_option for the datagram case in
_javanet_create(), however you need to add the SO_BROADCAST case and
link up the setBroadcast to it in Java.

Brian
-- 
Brian Jones <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]