mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-27 20:48:29 +00:00
Restore SO_EXCLUSIVEADDRUSE
This commit is contained in:
1 parent
87b62390b7
commit
72d3a49352
3 files changed
+1
-9
No files matched your search
@@ -102,13 +102,11 @@ static void ccb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
|||||||
static void timer_fn(void *arg) {
|
static void timer_fn(void *arg) {
|
||||||
struct mg_connection *c =
|
struct mg_connection *c =
|
||||||
mg_http_connect(&s_mgr, "http://cesanta.com", ccb, NULL);
|
mg_http_connect(&s_mgr, "http://cesanta.com", ccb, NULL);
|
||||||
if (c) {
|
if (c != NULL)
|
||||||
c->is_hexdumping = 1;
|
|
||||||
mg_printf(c, "%s",
|
mg_printf(c, "%s",
|
||||||
"GET /downloads/mws/version.json HTTP/1.0\r\n"
|
"GET /downloads/mws/version.json HTTP/1.0\r\n"
|
||||||
"Host: cesanta.com\r\n"
|
"Host: cesanta.com\r\n"
|
||||||
"\r\n");
|
"\r\n");
|
||||||
}
|
|
||||||
(void) arg;
|
(void) arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2458,9 +2458,6 @@ struct mg_connection *mg_sntp_connect(struct mg_mgr *mgr, const char *url,
|
|||||||
|
|
||||||
#if MG_ENABLE_SOCKET
|
#if MG_ENABLE_SOCKET
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#ifndef SO_EXCLUSIVEADDRUSE
|
|
||||||
#define SO_EXCLUSIVEADDRUSE ((int) (~SO_REUSEADDR))
|
|
||||||
#endif
|
|
||||||
#define MG_SOCK_ERRNO WSAGetLastError()
|
#define MG_SOCK_ERRNO WSAGetLastError()
|
||||||
#define FD(C_) ((SOCKET)(C_)->fd)
|
#define FD(C_) ((SOCKET)(C_)->fd)
|
||||||
#elif MG_ARCH == MG_ARCH_FREERTOS
|
#elif MG_ARCH == MG_ARCH_FREERTOS
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
|
|
||||||
#if MG_ENABLE_SOCKET
|
#if MG_ENABLE_SOCKET
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#ifndef SO_EXCLUSIVEADDRUSE
|
|
||||||
#define SO_EXCLUSIVEADDRUSE ((int) (~SO_REUSEADDR))
|
|
||||||
#endif
|
|
||||||
#define MG_SOCK_ERRNO WSAGetLastError()
|
#define MG_SOCK_ERRNO WSAGetLastError()
|
||||||
#define FD(C_) ((SOCKET)(C_)->fd)
|
#define FD(C_) ((SOCKET)(C_)->fd)
|
||||||
#elif MG_ARCH == MG_ARCH_FREERTOS
|
#elif MG_ARCH == MG_ARCH_FREERTOS
|
||||||
|
|||||||
Reference in new issue
Block a user