fixed windows build

This commit is contained in:
Anonymous275
2020-11-06 16:43:18 +02:00
parent b49abe02eb
commit e5a0d43024
35 changed files with 40 additions and 9445 deletions

View File

@@ -41,10 +41,11 @@ void TCPHandle(Client*c,const std::string& data){
void TCPRcv(Client*c){
Assert(c);
if(c == nullptr || c->GetStatus() < 0)return;
char buf[4096];
size_t len = 4096;
#define len 4096
char buf[len];
ZeroMemory(buf, len);
int64_t BytesRcv = recv(c->GetTCPSock(), buf, len,0);
#undef len
if (BytesRcv == 0){
debug(Sec("(TCP) Connection closing..."));
if(c->GetStatus() > -1)c->SetStatus(-1);