Change the method to connect to the server socket in the service.