count = 0;
do
{
try
{
length = client.receive(data);
}
// Here we catch both SocketException and InterruptedIOException,
// because even though the JDK 1.1 docs claim that
// InterruptedIOException is thrown on a timeout, it seems
// SocketException is also thrown.