Added a timeout feature to the client class.