mirror of
https://github.com/diamante0018/MW3ProtocolExploit.git
synced 2025-04-19 20:32:52 +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);
|
||||
printf("Started thread\n");
|
||||
|
||||
u_long iMode = 1;
|
||||
ioctlsocket(sock, FIONBIO, &iMode);
|
||||
u_long iMode = 0;
|
||||
int ioctlResult = ioctlsocket(sock, FIONBIO, &iMode);
|
||||
if (ioctlResult != 0)
|
||||
{
|
||||
printf("ioctlsocket error: %d\n", ioctlResult);
|
||||
return 1;
|
||||
}
|
||||
|
||||
sockaddr_in sender{};
|
||||
int senderSize = sizeof(sender);
|
||||
@ -83,6 +88,8 @@ DWORD WINAPI recvTh(LPVOID)
|
||||
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
Loading…
x
Reference in New Issue
Block a user