You can tell TextLineEncoder and TextLineDecoder to use any LineDelimiter you need. TextLineCodecFactory just wraps these two up and implements the ProtocolCodecFactory interface.
(just two methods, getEncoder() and getDecoder())

-Eero Nevalainen

Ahmed Al-Obaidy wrote:
So what you are suggesting...

can I tell TextLineCodecFactory to use different LineDelimiter?? or should I 
write new codec from scratch??

Eero Nevalainen <[EMAIL PROTECTED]> wrote:
Ahmed Al-Obaidy wrote:
Even more, when tracking devices connect the server... the messages appear
in the Log.. but the IoHandlerAdapter never catch the messages events...
the output look like this

Tracking Gateway server started.
57453 [SocketAcceptorIoProcessor-0.0] INFO ConnHandler -
[/213.139.63.254:3599] CREATED
57469 [AnonymousIoService-1] INFO ConnHandler - [/213.139.63.254:3599]
OPENED
58859 [AnonymousIoService-2] INFO ConnHandler - [/213.139.63.254:3599]
RECEIVED: HeapBuffer[pos=0 lim=102 cap=8192: 33 35 33 35 37 39 30 31 34 38
34 32 33 36 39 2C 30 35 2A 38 32 37 2C 30 30 30 2C 50 54 33 33 2C 56 2C 30
30 30 30 2E 30 30 30 30 2C 4E 2C 30 30 30 30 30 2E 30 30 30 30 2C 45 2C 30
30 30 2E 30 2C 30 30 30 2E 30 2C 30 30 2E 30 2C 30 30 3A 30 30 3A 31 37 20
30 36 2D 30 31 2D 38 30 2C 32 2E 32 31 2C 39 39 0D]
78672 [AnonymousIoService-3] INFO ConnHandler - [/213.139.63.254:3599]
RECEIVED: HeapBuffer[pos=0 lim=102 cap=8192: 33 35 33 35 37 39 30 31 34 38
34 32 33 36 39 2C 30 35 2A 38 32 37 2C 30 30 30 2C 50 54 33 33 2C 56 2C 30
30 30 30 2E 30 30 30 30 2C 4E 2C 30 30 30 30 30 2E 30 30 30 30 2C 45 2C 30
30 30 2E 30 2C 30 30 30 2E 30 2C 30 30 2E 30 2C 30 30 3A 30 30 3A 34 39 20
30 36 2D 30 31 2D 38 30 2C 32 2E 32 31 2C 39 39 0D]

Well the hexdump only shows the 'carriage return' character at the end(CR 0x0D) so my guess is the textlinedecoder is still waiting for the 'line feed' character (LF 0x0A).

-Eero Nevalainen


---------------------------------
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.

Reply via email to