You're right.
For some messages there's 0x0A at the end so readline works.

There's one special reason/message with no termination at all, so readline 
keeps waiting as expected.

I have a workaround forcing the dialog to do something else so I'm receiving a 
new message with termination then search for the string (on the not terminated 
message) and substr the complete string to remove the non terminated one which 
in fact is the one that I need to terminate the talk and close the socket.

I know this is weird, but this asterix guys are _really_ weird people :)

Regards.

------Original Message------
From: Christopher Schultz
To: Tomcat Users List
ReplyTo: Tomcat Users List
Subject: Re: OT: about readers
Sent: Jun 16, 2011 19:16

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexis,

On 6/16/2011 5:36 PM, alexis wrote:
> im reading from a socket with a bufferedreader using readLine, it
> works perfect, problem is some messages has no termination at all, so
> readLine never completes.

Do you mean that you are hitting the end of the input, but there's no
EOF, so you wait forever? That's expected behavior.

Reader.readLine should return something when a (environment-specific)
newline is read or EOF. Is that not what you're experiencing?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk36gKoACgkQ9CaO5/Lv0PAs8ACeMsC+zJ0gNyuWz8TkBf698Rpc
UZ8AnRwM0D6FIpeHP1WRx2ZCcpopI7s8
=1H8R
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Enviado desde blackberry

Reply via email to