⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 znetserverdlg.h

📁 iocp vc例子,自己是学DELPHI
💻 H
字号:
// ZNetServerDlg.h : header file
//

#if !defined(AFX_ZNETSERVERDLG_H__78C74F09_FA01_49D7_BD4B_92EC7AAFB955__INCLUDED_)
#define AFX_ZNETSERVERDLG_H__78C74F09_FA01_49D7_BD4B_92EC7AAFB955__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ServerProcess.h"
#include "ProgressDialog.h"
/////////////////////////////////////////////////////////////////////////////
// CZNetServerDlg dialog

class CZNetServerDlg : public CDialog
{
// Construction
public:
	CZNetServerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CZNetServerDlg)
	enum { IDD = IDD_ZNETSERVER_DIALOG };
	CListCtrl	m_lcClient;
	UINT	m_nPort;
	UINT	m_nCmd;
	CString	m_strFileList;
	UINT	m_lParam;
	UINT	m_wParam;
	CString	m_strServer;
	int		m_nServerPort;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CZNetServerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
public:
	CIocpManager m_IocpMngr;
	CServerProcess m_ServerProcess;
	CProgressDialog m_dlgProgress;
	
public:
	int m_nSocket;
	static DWORD WINAPI DisconnectThread(LPVOID lpVoid);
	static DWORD WINAPI SendThread(LPVOID lpVoid);
	static DWORD WINAPI SyncSendThread(LPVOID lpVoid);
public:
	void ProcessNewConnection(CIocpContext* pContext);	//新建连接	
	void ProcessDisConnection(SOCKET soSocket);	//断开连接	
	void ProcessPacket(SOCKET soSocket, CIocpPacket* pPacket);
	
// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CZNetServerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnButton2();
	afx_msg void OnButton3();
	afx_msg void OnButton5();
	afx_msg void OnButton6();
	afx_msg void OnButton7();
	afx_msg void OnButton8();
	afx_msg void OnButton9();
	afx_msg void OnDestroy();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_ZNETSERVERDLG_H__78C74F09_FA01_49D7_BD4B_92EC7AAFB955__INCLUDED_)

⌨️ 快捷键说明

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