Microsoft also mentions this difference in this KB article: "If the project is linked with Ws2_32.lib, setsockopt will fail with runtime error 10042 (WSAENOPROTOOPT). This is because in Winsock.h, IP_ADD_MEMBERSHIP is defined as 5. The corresponding Winsock runtime can't resolve option ...
setsockopt(*opts) OSError: [WinError 10042] 在 getsockopt 或 setsockopt 调用中指定的一个未知的、无效的或不受支持的选项或层次。 分享4赞 正在加载...