Struct SockAddr_in local, local.sin_addr.s_addr = htonl (inaddr_any); local.sin_family = AF_INET / / Setting Up Local Receive IP is the native IPORT = 8000; // Set local receiving port 8000 local.sin_port = Htons (iPort) ;
IF (Bind (SLISTEN, STRUCKADDR *) & local, sizeof (local)) == Socket_ERROR) {Printf ("Bind () failed:% d / n", wsagetlasterror ()); return 1;}