#pragma once

#include "ClientSocket.h"

class CLan
{
private:
	CClientSocket m_Socket;										// LAN socket
	char m_TransferBuffer[65536];								// Transfer buffer

public:
	CString m_ReceiveData;										// Received data

public:
	CLan();
	virtual ~CLan();
	BOOL OpenInterface(CString HostAddress, UINT HostPort);
	void CloseInterface();
	BOOL SendMsg(CString SendData);
	BOOL ReceiveMsg(DWORD Timeout);
	BOOL SendQueryMsg(CString SendData, DWORD Timeout);
	CString GetLastErrorMessage(DWORD MessageId);
};
