Trustin Lee wrote:
> 
> You are using TextLineDecoder in a wrong way.  I'd suggest the
> following implementation:
> 
> 1) Use TextLineDecoder as it is; do not extend it.
> 2) Once you inserted your protocol codec filter, your IoHandler's
> messageReceived() will be provided with a line of string.
> 
> HTH,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

Thanks for your reply, Trustin. I change my implementation according to your
advice. 
But again, default TextLineCodecFactory does not work well with windows.
Messages sent to client are only terminated with 0A character. 

To fix this linedelimeter problem, I wrote a new codec factory with

        encoder = new TextLineEncoder(Charset.forName("UTF-8"),
LineDelimiter.WINDOWS);
        decoder = new TextLineDecoder(Charset.forName("UTF-8"),
LineDelimiter.WINDOWS);

Interestingly, this works fine both from windows telnet and solaris telnet.
-- 
View this message in context: 
http://www.nabble.com/TextLineDecoder-decode-function-tf4142835s16868.html#a11806556
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

Reply via email to