socket(AF_INET, SOCK_STREAM, IPPROTO_IP);//创建TCPsocket

/*
 *创建TCPsocket
 */
SOCKET        sListen,
    sListen = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
    if (sListen == SOCKET_ERROR)
    {
        printf("socket() failed: %d/n", WSAGetLastError());
        return 1;
    }

closesocket(sListen);

你可能感兴趣的:(socket(AF_INET, SOCK_STREAM, IPPROTO_IP);//创建TCPsocket)