mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Allow for compilation in Visual Studio 9 (2008) with NS_ENABLE_IPV6.
This commit is contained in:
1 parent
25326b3b12
commit
f19bbc73cc
1 file changed
+2
-1
+2
-1
@@ -79,6 +79,7 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma comment(lib, "ws2_32.lib") // Linking with winsock library
|
#pragma comment(lib, "ws2_32.lib") // Linking with winsock library
|
||||||
#endif
|
#endif
|
||||||
|
#include <Ws2tcpip.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#ifndef EINPROGRESS
|
#ifndef EINPROGRESS
|
||||||
@@ -2961,9 +2962,9 @@ size_t mg_websocket_write(struct mg_connection *conn, int opcode,
|
|||||||
copy_len = 4 + data_len;
|
copy_len = 4 + data_len;
|
||||||
} else {
|
} else {
|
||||||
// 64-bit length field
|
// 64-bit length field
|
||||||
copy[1] = 127;
|
|
||||||
const uint32_t hi = htonl((uint32_t) ((uint64_t) data_len >> 32));
|
const uint32_t hi = htonl((uint32_t) ((uint64_t) data_len >> 32));
|
||||||
const uint32_t lo = htonl(data_len & 0xffffffff);
|
const uint32_t lo = htonl(data_len & 0xffffffff);
|
||||||
|
copy[1] = 127;
|
||||||
memcpy(copy+2,&hi,sizeof(hi));
|
memcpy(copy+2,&hi,sizeof(hi));
|
||||||
memcpy(copy+6,&lo,sizeof(lo));
|
memcpy(copy+6,&lo,sizeof(lo));
|
||||||
memcpy(copy + 10, data, data_len);
|
memcpy(copy + 10, data, data_len);
|
||||||
|
|||||||
Reference in new issue
Block a user