#define _WINSOCK_DEPRECATED_NO_WARNINGS
#pragma comment(lib, "Ws2_32.lib")
#include "NetDLL.h"
#include <iostream>

void NetInit()
{
	WSAData wsaData;
	if (WSAStartup(MAKEWORD(2, 2), &wsaData))
		exit(1);
}

void MyConnect(SOCKADDR* addr, SOCKET* Socket)
{
	if (WSAConnect(*Socket, addr, sizeof(*addr), NULL, NULL, NULL, NULL))
	{
		std::cout << WSAGetLastError() << '\n';
		exit(2);
	}
	Sleep(10);
}