#pragma once

class UDPClient {
public:
	UDPClient(char *RemoteAddress);
	UDPClient(unsigned long RemoteIP);
	~UDPClient();
	int TransmitData(char *buffer);
	SOCKADDR_IN GetAddr();
private:
	unsigned int	UDPSocket;		// Server socket descriptor
	SOCKADDR_IN		LocalAddr;		// Local Internet address
	int				addr_len;		// Internet address length
	char			out_buf[4020];	// buffer for output data

};

class UDPServer {
public:
	UDPServer(HWND hWnd);
	~UDPServer();
	int ReceiveData(char *buffer);
	SOCKADDR_IN GetRemoteAddr();

private:
	unsigned int	UDPSocket;		// Server socket descriptor
	SOCKADDR_IN		LocalAddr;		// Local Internet address
	int				addr_len;		// Internet address length
	SOCKADDR_IN		RemoteAddr;		// Remote Internet address
	char			in_buf[4020];	// buffer for input data
};
