#pragma once
#include <afxsock.h>           

	static const CString IMATIC_CHANNEL_IP=L"192.168.1.4";
	static const int IMATIC_CHANNEL_8_PORT=30000;
	static const int IMATIC_CHANNEL_16_PORT=3000;

class iMaticClientSocket :
	public CAsyncSocket
{


public:
	iMaticClientSocket( );
	~iMaticClientSocket(void);
public:
	int wm_message_finsh_connect_sock;
	int wm_message_finsh_send_command;
	boolean isConnect;
	boolean isConnecting;
	boolean ConnectSocket(int type,int wm_message_finsh_connect_sock,int wm_message_finsh_send_command);
	void CloseSoket();
	virtual void OnConnect(int nErrorCode);

	boolean SendCommand(int type,int number,int stuate);
	virtual void OnReceive(int nErrorCode);
private:
	unsigned char* GetChannel16Command(int number,int stuate);
	unsigned char* GetChannel8Command(int number,int stuate);
};

