How long does the standard Bitcoin client wait between sending a message to another client and deciding that the client is not responding? That is, if someone makes a client that takes a couple seconds to write a response to a request, will it still work with the Bitcoin network?
Bitcoin client decides that the other client is not responding when it receives report from operation system that the connection is dead.
Bitcoin relies on OS implementation of TCP to send and receive messages. For example, by default, when connection was already established and Round Trip Time is known, Windows will try to resend data segment five times doubling wait time after each resend before reporting connection as dead. So the total wait time is: "Round Trip Time" * 2^(5-1) .
P.S. Timeouts are different for each type of message, e.g. total connection initiation timeout equals to 6 seconds . TCP/IP Configuration Parameters