Intermittent TCP/IP messages

The way its set up at the end of void loop(), that is not the way to use millis(). That will block for the timeout duration and you may as well have just used delay(1000);