Windows UDP sockets: recvfrom() fails with error 10054
Posted 明天有风吹
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows UDP sockets: recvfrom() fails with error 10054相关的知识,希望对你有一定的参考价值。
https://stackoverflow.com/questions/34242622/windows-udp-sockets-recvfrom-fails-with-error-10054
#include <Winsock2.h> #include <Mstcpip.h> #include <stdio.h> #pragma comment(lib, "ws2_32.lib") #define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR, 12) BOOL bNewBehavior = FALSE; DWORD dwBytesReturned = 0; WSAIoctl(iSock, SIO_UDP_CONNRESET, &bNewBehavior, sizeof bNewBehavior, NULL, 0, &dwBytesReturned, NULL, NULL);
以上是关于Windows UDP sockets: recvfrom() fails with error 10054的主要内容,如果未能解决你的问题,请参考以下文章
python3.6:socket.recv() 与 socket.recv_into() 性能对比