mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
1. Updated to use #define for maximum header size
2. Modified AsyncSocket_Disconnect, to shutdown SD_SEND/SHUT_RD, instead of RDWR/BOTH, because sent data could be lost if a reset was sent 3. Added hardening for http.server packet parsing
This commit is contained in:
@@ -795,11 +795,11 @@ void ILibAsyncSocket_Disconnect(ILibAsyncSocket_SocketModule socketModule)
|
||||
{
|
||||
#if defined(_WIN32_WCE) || defined(WIN32)
|
||||
#if defined(WINSOCK2)
|
||||
shutdown(s, SD_BOTH);
|
||||
shutdown(s, SD_SEND);
|
||||
#endif
|
||||
closesocket(s);
|
||||
#elif defined(_POSIX)
|
||||
shutdown(s, SHUT_RDWR);
|
||||
shutdown(s, SHUT_RD);
|
||||
close(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user