Added thread sleep time and buffered reads from sockets on both client and server.