This is precisely what i did after looking at some source. It would've been
nice if you could configure a TextLineCodecFactory with one's own
TextLineEncoder/Decoder instead of having them hard-coded in the ctor.
Trustin Lee wrote:
>
> 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
>
>
--
View this message in context:
http://www.nabble.com/sending-null-terminated-strings-tf4410525s16868.html#a12599336
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.