You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Justin Rudd <ju...@gmail.com> on 2005/05/23 22:51:01 UTC

A couple of general Mina questions

Hey all!

I'm looking to use MINA to do most of my communications between some
daemons.  I want to use the Protocol layer for all of it if at all
possible.

What I'm wondering is what happens when the ByteBuffer my Decoder gets
isn't complete?  Do I need to use CumulativeProtocolDecoder?  Or is
there some other way to do it?

Also has anyone tried using the Datagram functionality for UDP
broadcasts?  I'd love to be able to connect to a broadcast address and
then layer a protocol on top of it.  Just wondering if anyone has
tried this and what (if any) problems you ran into.  Or maybe there
will be more explicit broadcast support in another drop?

Thanks!

-- 
Justin Rudd
http://seagecko.org/thoughts/

Re: A couple of general Mina questions

Posted by Trustin Lee <tr...@gmail.com>.
Hi Justin,

2005/5/24, Justin Rudd <ju...@gmail.com>: 
> 
> Hey all!
> 
> I'm looking to use MINA to do most of my communications between some
> daemons. I want to use the Protocol layer for all of it if at all
> possible.

 Good choice.

What I'm wondering is what happens when the ByteBuffer my Decoder gets
> isn't complete? Do I need to use CumulativeProtocolDecoder? Or is
> there some other way to do it?

 You have to use CumulativeProtocolDecoder or DemuxingProtocolCodecFactory. 
DemuxingProtocolCodecFactory works better for binary protocols. 
DemusingProtocolCodecFactory uses CumulativeProtocolDecoder internally.

Also has anyone tried using the Datagram functionality for UDP
> broadcasts? I'd love to be able to connect to a broadcast address and
> then layer a protocol on top of it. Just wondering if anyone has
> tried this and what (if any) problems you ran into. Or maybe there
> will be more explicit broadcast support in another drop?

 Enrique tried to use MINA for multicasting, but he failed. It seems like 
NIO doesn't support broadcasting. Please let me know if this is possible. We 
planned to implement non-NIO sockets, too, so you'll be able to use 
multicasting when it's ready.
 Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/