mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: UDP datagrams write and receive
Date Wed, 22 Aug 2007 23:13:54 GMT
On 8/23/07, Adam Fisk <a@lastbamboo.org> wrote:
> I'm wondering if anyone knows if there are guarantees that a each call to
> DatagramChannel.write(ByteBuffer src) *always* results in the sending of a
> single datagram.  In all my tests this is the case, but I'm not sure if it's
> operating system-specific.
>
> More specifically, can 2 calls to DatagramChannel.write(ByteBuffer src) get
> consolidated into the sending of a single datagram on the wire?  I know the
> DatagramChannel.write(ByteBuffer[] srcs) call will consolidate them, but it
> at least appears that calling write for individual buffers sends each in its
> own datagram.
>
> Possibly I shouldn't rely on this behavior?  Anyone have any experience with
> this?

AFAIK, you are safe to assume one write call sends a single datagram.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Mime
View raw message