On 9/10/07, tunkul <[EMAIL PROTECTED]> wrote:
>
> Hi, i'd like to set up a server which accepts newline terminated strings as
> the "messages" (ie, pretty much what TestLineCodecFactory does), but when i
> send messages on these sessions i want to terminate them with a null
> character, not the newline char.
>
> What's the best way to accomplish this?

You could create a new ProtocolCodecFactory with two existing classes;
TextLineEncoder and TextLineDecoder.  Please specify a custom
LineDelimiter for the two (i.e. new LineDelimiter("\0")).

Please refer to the source code of TextLineCodecFactory.  You could
simply modify the constructor invocation part.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to