From fe5f28c4117bb875cc09bbf8b14a244eec72e21d Mon Sep 17 00:00:00 2001 From: xfangfang <2553041586@qq.com> Date: Wed, 19 Jul 2023 14:32:55 +0800 Subject: [PATCH 3/5] Disable SO_EXCLUSIVEADDRUSE in Windows as we need the UDP 1900 port to be always available --- mongoose.h | 2 ++ 1 file changed, 2 insertions(+) diff --git mongoose.h mongoose.h index 1c5e14f6..b9d8162b 100644 --- mongoose.h +++ mongoose.h @@ -521,6 +521,8 @@ typedef int socklen_t; #define SO_EXCLUSIVEADDRUSE ((int) (~SO_REUSEADDR)) #endif +#undef SO_EXCLUSIVEADDRUSE + #define MG_SOCK_ERR(errcode) ((errcode) < 0 ? WSAGetLastError() : 0) #define MG_SOCK_PENDING(errcode) \ -- 2.51.0