On 3/28/06, Jörg Henne <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> today I had a quick first look at the issue of implementing (or rather
> continuing the existing work for) the DHCP protocol support. The notion
> was that DHCP can't be completed until mina supports broadcast.
>
> Well, I feel this might end up as the most stupid question in this (and
> several other) mailing-list's history, but what I see is that
> - there is already some code in place to support broadcast in MINA, e.g.
> the line
>     ch.socket().setBroadcast( cfg.isBroadcast() );
>   in DatagramAcceptorDelegate.registerNew().
> - if one configures the MINA server like this:
>         IoAcceptor acceptor = new DatagramAcceptor();
>         IoAcceptorConfig config = new DatagramAcceptorConfig();
>
> ((DatagramSessionConfigImpl)config.getSessionConfig()).setBroadcast(true);
>         acceptor.bind(
>                 new InetSocketAddress( 67 ),
>                 new DhcpProtocolHandler(),
>                 config );
>   the server receives broadcasts just fine.
> - sending data to the broadcast address worked for me, too, with minimal
> changes to DhcpProtocolHandler.messageReceived():
>           InetSocketAddress inetSocketAddress = new InetSocketAddress(
>               InetAddress.getByName("255.255.255.255"), PORT);
>           ConnectFuture future = connector.connect(inetSocketAddress,
>               new DhcpProtocolHandler());
>
> After all, I don't see that broadcast doesn't work with NIO. What
> doesn't work with NIO, however, (at least as I see it) is multicast. But
> multicast is a totally different beast and not required for DHCP.
> So, well, the question is: as this sounds too good, to be true - what
> did I miss?


It didn't work when Enrique tried to implement broadcasting with MINA last
time.  If it works, it's a very great news.  :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to