Hello all,

I'm new to Mina, currently in the process of writing a server, according to a protocol that someone else wrote. The "handshake" sequence goes like this :

1. client connects.
2. server says "Hi, this is SERVER BLAH BLAH <CR><LF>"
3. server says "Login:" --> note: without <CR><LF>
4. client replies with "username<CR><LF>"
5. server says "Password:" --> note: without <CR><LF>
6. client replies with "password<CR><LF"
7. if ok, server says "Login OK <CR><LF>",
   otherwise "Login FAIL <CR><LF>"
8. server sends out multiple lines of data, with <CR><LF> as
   end-of-line marker.

I'm currently using the supplied TextLineCodecFactory, overridden using LineDelimiter.WINDOWS as both the encoder and decoder. The problem is with item #3 and #5 above, since the protocol expects a line without <CR><LF>. I have no idea where to start.

Thank you very much in advance,
t.s.

PS: Unfortunately the protocol is "set in stone" so i can't change it.





Reply via email to