sock.h

来自「中国联通短信网络协议SGIP,可直接与联通短信网关相连」· C头文件 代码 · 共 60 行

H
60
字号
#if !defined(AFX_SOCK_H__7A0DF041_E21D_11D5_A98A_0050BA6317C2__INCLUDED_)
#define AFX_SOCK_H__7A0DF041_E21D_11D5_A98A_0050BA6317C2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// sock.h : header file
//



/////////////////////////////////////////////////////////////////////////////
// sock command target

class sock : public CAsyncSocket
{
// Attributes
public:


	CString HostAddress;
	UINT nHostPort;
	UINT m_port;
	CString m_ip;
	char m_szBuffer[8192];
	int m_nLength;
// Operations
public:
	sock();
	virtual ~sock();

// Overrides
public:
	void Clean();
	void SocketSend(char * buf, int len,UINT port,CString ip);
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(sock)
	public:
	virtual void OnAccept(int nErrorCode);
	virtual void OnReceive(int nErrorCode);
	virtual void OnSend(int nErrorCode);
	virtual void OnConnect(int nErrorCode);
	//}}AFX_VIRTUAL

	// Generated message map functions
	//{{AFX_MSG(sock)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

// Implementation
protected:
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SOCK_H__7A0DF041_E21D_11D5_A98A_0050BA6317C2__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?