mirror of
https://github.com/diamante0018/MW3ProtocolExploit.git
synced 2025-04-19 20:32:52 +00:00
Cleaning up
This commit is contained in:
parent
8c963e3142
commit
4c72d75fcc
@ -9,7 +9,7 @@ SOCKET sock;
|
||||
bool startUp()
|
||||
{
|
||||
WSADATA wsa_data;
|
||||
int wasResult = WSAStartup(MAKEWORD(2, 2), &wsa_data);
|
||||
auto wasResult = WSAStartup(MAKEWORD(2, 2), &wsa_data);
|
||||
if (wasResult != 0)
|
||||
{
|
||||
printf("WSAStartup error: %d\n", wasResult);
|
||||
@ -23,13 +23,13 @@ bool startUp()
|
||||
return false;
|
||||
}
|
||||
|
||||
sockaddr_in service;
|
||||
sockaddr_in service{};
|
||||
service.sin_family = AF_INET;
|
||||
service.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
// net_masterServerPort
|
||||
service.sin_port = htons(27014);
|
||||
int result = bind(sock, (SOCKADDR*)&service, sizeof(service));
|
||||
auto result = bind(sock, (SOCKADDR*)&service, sizeof(service));
|
||||
if (SOCKET_ERROR == result)
|
||||
{
|
||||
printf("Can't bind socket\n");
|
||||
@ -47,7 +47,7 @@ DWORD WINAPI recvTh(LPVOID)
|
||||
printf("Started thread\n");
|
||||
|
||||
u_long iMode = 0;
|
||||
int ioctlResult = ioctlsocket(sock, FIONBIO, &iMode);
|
||||
auto ioctlResult = ioctlsocket(sock, FIONBIO, &iMode);
|
||||
if (ioctlResult != 0)
|
||||
{
|
||||
printf("ioctlsocket error: %d\n", ioctlResult);
|
||||
|
Loading…
x
Reference in New Issue
Block a user