Ok, seems to do what I want if I ad a flush to the stream -- I thought is would
autoflush considering the PrintWriter constructor.
out = new PrintWriter(socket.getOutputStream(), true);
out.print(payload); // no /r/n on the print
out.flush();
-----Original Message-----
From: Colin Cullen <[EMAIL PROTECTED]>
Sent: Nov 29, 2005 6:15 PM
To: Apache Directory Developers List <[email protected]>, Colin Cullen
<[EMAIL PROTECTED]>
Subject: Re: [MINA] message delimiters.
Forgot to mention that I am using Mina-0.8.0. -- Colin
-----Original Message-----
From: Colin Cullen <[EMAIL PROTECTED]>
Sent: Nov 29, 2005 6:01 PM
To: [email protected]
Subject: [MINA] message delimiters.
Hi All,
I am having a little problem with my messaging. I have modeled my app similar
to the way the SumUp example application works. Things work fine as long as my
messages are delimited by using \r\n at the end of the message. I would like
to use a different single byte delimiter (0x03) (if possible? for compatiblity
with the current client base) to end my messages, but I can't seem to get this
to work (actually I don't know how to get this to work). I decided to try
using my test client against both the echo example and the reverser example, to
see if it behaves in the same manner in this regard. Both work fine as long as
I use something like this to write my message:
out = new PrintWriter(socket.getOutputStream(), true);
out.println(payload); // contains /r/n ending to msg
But if I leave off the \r\n, e.g.,
out = new PrintWriter(socket.getOutputStream(), true);
out.print(payload); // no /r/n on the print
Then both echo and reverser servers neglect to forward the message on to the
rest of the framework -- which is the same behavior I get from my server.
I am using SimpleServiceRegistry to initiate the framework. I am new to NIO
and I am not sure what I am missing. Could somebody point me in the right
direction?
Thanks
Colin