Muhammad Ichsan a écrit :
Dear All,

I'm using Mina 2 with TextLineCodeFactory as the protocol codec. As
session is opened, I need use the same connection to send many
messages. But even though the messages are sent with delay 1 second
using the same session, the remote peer has not received any of them.
UNTIL, all messages are written (session.write).

I don't want this. I want each message is sent immediately just like
simple java socket send. How to achieve this? Do I have to create my
own codec which flush each message immediately?
Simply add a '\n' at the end of each message. The codec you are using (Text*Line*Codec) is expeciting to see *lines*, not messages.

Reply via email to