Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-22 Thread Erinc Arikan
Hi Emmanuel; Thanks for the help, I think that I solved my problem about handling fragmented messages. The only remaining problem for me is to store incomplete messages(stream of bytes) to the session, so that next time rest of the message comes I can validate message integrity, and if it's

RE: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-22 Thread Jim Newsham
...@gmail.com] Sent: Friday, May 22, 2009 4:48 AM To: users@mina.apache.org Subject: Re: MINA newbie question(message gets chipped 5 or 6 bytes every time) Hi Emmanuel; Thanks for the help, I think that I solved my problem about handling fragmented messages. The only remaining problem

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-15 Thread Erinc Arikan
Thanks Emmanuel; Yes I believe, in your decoder if you extend CumulativeProtocolDecoder, it takes care of fragmented messages in different PDU's (It waits till they are complete). But you are right if there's more than one message in the same PDU, it's little bit harder to handle given that

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-15 Thread Emmanuel Lecharny
On Fri, May 15, 2009 at 4:38 PM, Erinc Arikan erincari...@gmail.com wrote: Thanks Emmanuel; Is this issue related to Nagle's Algorithm? No. Do I have to use ((SocketSessionConfig) connector.getSessionConfig()).setTcpNoDelay(false) No, certainly not ! to ensure that I will

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-15 Thread David Rosenstrauch
Emmanuel Lecharny wrote: Be aware that you not only can receive a fragment, but may be - depending on your protocol - more than one message in the same PDU (ie you may receive 200 bytes, 2 times 78 bytes plus some more bytes associated with another message). You have to deal with that. If

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-15 Thread Emmanuel Lecharny
David Rosenstrauch wrote: Emmanuel Lecharny wrote: Be aware that you not only can receive a fragment, but may be - depending on your protocol - more than one message in the same PDU (ie you may receive 200 bytes, 2 times 78 bytes plus some more bytes associated with another message). You have

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-14 Thread Emmanuel Lecharny
Erinc Arikan wrote: Hi, I just started working on MINA last week, I am trying to convert a gateway application to MINA - ACTIVEMQ project. I am really impressed the simplicity MINA brings. After this irrelevant introductory part, Here's my problem: My clients connect to the server using a tcp

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-14 Thread Erinc Arikan
Thanks for the response. I actually figured out my problem I was stuffing and unstuffing data in my pojo, It looks like that's the problem I can't believe how I totally forgot about that. As you have mentioned the following code for my decoder will work ok for LAN scenarios. It will be