for server and clients: send heartbeat message if no message sent for 20 seconds. close connection if no message received for 30 seconds.