Set Timeout when reading from socket