Changed the code of Server and Client.