Thanks for your reply.
1. What's so bad about StreamIoHandler?
2. I've searched in
mina-0.9.2\examples\src\main\java\org\apache\mina\examples for
ProtocolCodecFilter but didn't find anything - can you point at the right
example?
3. Just from looking at the javadoc, it seems like messageReceived is
invoked with a message - how is it created? Can this message be created with
data from several packets arriving (cellular networks are sometimes slow)?
What if several protocol messages are sent together?
Thanks again,
Zohar.

On 4/1/06, peter royal <[EMAIL PROTECTED]> wrote:
>
> On Apr 1, 2006, at 2:05 PM, Zohar Amir wrote:
> > I'll try to sum up my problem again:
> > I have mobile clients connecting to my server via TCP. Clienmts may
> > send
> > more than a single message at a time. Being mobile clients,
> > messages may be
> > slow in arriving.
> > All this lead me to try and use the StreamIoHandler. When trying to
> > do so
> > I'm facing a problem with clients that send a single message and
> > then close
> > the connection - this leads to the invocation of the sessionClosed
> > method
> > before the new handling thread gets a chance to read the available
> > data from
> > the incoming stream.
> > Can anyone please help me with this?
>
> I highly recommend *not* using the StreamIoHandler. Use the
> ProtocolCodecFilter to implement your protocol. There are some
> examples in the mina distribution that illustrate its use.
> -pete
>
> --
> [EMAIL PROTECTED] - http://fotap.org/~osi
>
>
>
>
>

Reply via email to