📄 tcpclient_mod.h
字号:
// TcpClient_mod.h : main header file for the TCPCLIENT_MOD DLL
//
#if !defined(AFX_TCPCLIENT_MOD_H__F6BDC523_FB8F_4732_B835_85908BDBC95E__INCLUDED_)
#define AFX_TCPCLIENT_MOD_H__F6BDC523_FB8F_4732_B835_85908BDBC95E__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "mod_tcpclient.h"
#include "TcpSvrObj.h"
/////////////////////////////////////////////////////////////////////////////
// CTcpClient_modApp
// See TcpClient_mod.cpp for the implementation of this class
//
class CTcpClient_modApp : public CWinApp
{
public:
bool SendToSvr(LPCTSTR szIPaddr, UINT nPort, const char *pMsg, int nLen);
bool GetSvrBuffData(LPCTSTR szIPaddr, UINT nPort ,char * pBuff, int *pLen);
bool RemoveAllSvr();
bool RemoveSvr(LPCTSTR szIPaddr, UINT nPort);
bool AddSvr(LPCTSTR szIPaddr, UINT nPort, UINT nBuffMax, HWND hWnd,
LPCTSTR initStr, UINT ninitLen);
CTcpClient_modApp();
// 服务器管理对象表,需要互斥处理
CMap<CString,LPCTSTR,CTcpSvrObj*, CTcpSvrObj* > m_svrs;
CCriticalSection m_svrsMutex;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTcpClient_modApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
//{{AFX_MSG(CTcpClient_modApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
template<> void AFXAPI DestructElements<CTcpSvrObj*>(CTcpSvrObj** pElements, int nCount);
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TCPCLIENT_MOD_H__F6BDC523_FB8F_4732_B835_85908BDBC95E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -