I'm trying to figure out the most elegant way to write a listener
thread that constantly listens on a given Socket for incoming TCP/IP messages.
Each individual TCP/IP message is composed of 4 bytes followed an XML document. The first 4 bytes are an integer that tells how long the subsequent XML document is.
How would you write something that listens on a socket and can pick up and process a message like this?
What goes inside the while parentheses?
[ June 15, 2005: Message edited by: Carl Bradbury ]