r/cpp•
Natural_Youth8736

Can someone explain this

So im doing Socket programing in C using winsoc2 and im donw with my server-socket now im programing my client-socket but i dont get this :

#define DEFAULT_PORT "27015"

// Resolve the server address and port

iResult = getaddrinfo(argv[1], DEFAULT_PORT, &hints, &result);

if (iResult != 0) {

printf("getaddrinfo failed: %d\n", iResult);

WSACleanup();

return 1;

}

Posted Oct 3, 2025, 5:20 PM UTC

02
Loading comments…