directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: [MINA] Another useful shortcut
Date Wed, 07 Dec 2005 10:39:33 GMT
Great!

 

________________________________

From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: 07 December 2005 04:33
To: Apache Directory Developers List
Subject: Re: [MINA] Another useful shortcut

 

Hi Jose,

2005/12/6, Jose Alberto Fernandez <jalberto@cellectivity.com>:

Hi Trustin,

You are correct. But maybe then, some way to peek at the value (without
moving the reading position) would do.

Something like:

    int peekInt()

    short peekShort()

    etc.

This will resolve most of the nasty part and allow people to check for
denials as well.


Instead, I added prefixedDataAvailable() to ByteBuffer.  You'll find out
this method is really useful for your use case.  There are two
prefixedDataAvailable(); one with maxDataLength parameter, and the other
without it.  It is up to you which method you're going to use, but I
recommend the former. 

HTH,
Trustin

-- 
what we call human nature is actually human habit
--
http://gleamynode.net/ 


Mime
View raw message