if(connect(client,(const struct sockaddr *)&clientService,sizeof(clientService))==SOCKET_ERROR) { printf("Failed to connect.\n"); WSACleanup(); return; }