mirror of
https://github.com/diamante0018/MW3ProtocolExploit.git
synced 2025-04-20 04:35:44 +00:00
Blocking mode
This commit is contained in:
parent
e6808a7703
commit
8c963e3142
11
src/main.cpp
11
src/main.cpp
@ -46,8 +46,13 @@ DWORD WINAPI recvTh(LPVOID)
|
|||||||
auto buf = std::make_unique<char[]>(BUF_SIZE);
|
auto buf = std::make_unique<char[]>(BUF_SIZE);
|
||||||
printf("Started thread\n");
|
printf("Started thread\n");
|
||||||
|
|
||||||
u_long iMode = 1;
|
u_long iMode = 0;
|
||||||
ioctlsocket(sock, FIONBIO, &iMode);
|
int ioctlResult = ioctlsocket(sock, FIONBIO, &iMode);
|
||||||
|
if (ioctlResult != 0)
|
||||||
|
{
|
||||||
|
printf("ioctlsocket error: %d\n", ioctlResult);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
sockaddr_in sender{};
|
sockaddr_in sender{};
|
||||||
int senderSize = sizeof(sender);
|
int senderSize = sizeof(sender);
|
||||||
@ -83,6 +88,8 @@ DWORD WINAPI recvTh(LPVOID)
|
|||||||
|
|
||||||
Sleep(1);
|
Sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user