#18 Creation of a function to connect the client to the server.