Problem: client timeout handling not working

Solution: set-up timer immediately, not only when getting protocol
command.

Also, improved documentation on how to do client/server connection
state. It's not trivial to get right.