serverdoc.h

来自「用CJ60Lib界面库制作的SQL数据库客户与服务器程序。」· C头文件 代码 · 共 77 行

H
77
字号
#if !defined(AFX_SERVERDOC_H__91199D72_25EB_4A3D_BB71_442001C8988B__INCLUDED_)
#define AFX_SERVERDOC_H__91199D72_25EB_4A3D_BB71_442001C8988B__INCLUDED_

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

#include "ListeningSocket.h"
#include "ClientSocket.h"
#include "Msg.h"	// Added by ClassView

/////////////////////////////////////////////////////////////////////////////
// CServerDoc document

class CServerDoc : public CDocument
{
protected:
	CServerDoc();           // protected constructor used by dynamic creation
	virtual ~CServerDoc();	
	DECLARE_DYNCREATE(CServerDoc)

// Attributes
public:
	CListeningSocket*	m_pSocket;
	CPtrList			m_connectionList;
	CString				m_msg;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CServerDoc)
	public:
	virtual void Serialize(CArchive& ar);   // overridden for document i/o
	virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
	virtual void DeleteContents();
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	protected:
	virtual BOOL OnNewDocument();
	//}}AFX_VIRTUAL

// Implementation
public:
	DWORD	UserLogon( CString& name, CString& code );
	void	SendMsg( CClientSocket* pSocket, CMsg& msg );
	void	CloseSocket( CClientSocket* pSocket );
	void	Message( LPCTSTR lpszMessage );
	CMsg*	ReadMsg( CClientSocket* pSocket );
	void	ProcessPendingRead( CClientSocket* pSocket );
	void	ProcessPendingAccept();

	void	PreScanFile( CMsg& msg );
	void	ScanFile( CString&, CMsg& );

	void	ShowAddress();

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CServerDoc)
	afx_msg void OnAddress();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_SERVERDOC_H__91199D72_25EB_4A3D_BB71_442001C8988B__INCLUDED_)

⌨️ 快捷键说明

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