How do I read TCP data on the Arduino (with Ethernet shield)

I definitely agree with PeterH there. Also:

    inByte = client.read();     // Read the character in the buffer

Try putting a test for client.available() before the read.