// TCPServerDlg.h : header file
//

#if !defined(AFX_TCPSERVERDLG_H__5742D5B0_863A_46E2_B770_558F0C351FB8__INCLUDED_)
#define AFX_TCPSERVERDLG_H__5742D5B0_863A_46E2_B770_558F0C351FB8__INCLUDED_

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

#include "MySocket.h"

/////////////////////////////////////////////////////////////////////////////
// CTCPServerDlg dialog

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

// Dialog Data
	//{{AFX_DATA(CTCPServerDlg)
	enum { IDD = IDD_TCPSERVER_DIALOG };
	CListBox	m_OutputCtrl;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTCPServerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CTCPServerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	//}}AFX_MSG

	// MySocket massage map functions
	// See "INFO: Use ON_MESSAGE() Macro to Map Less-Common Messages" in MSDN
	// for more information on processing user defined messages
	afx_msg LRESULT OnMySocketAccept(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnMySocketReceive(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnMySocketClose(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()

private:
	CMySocket m_ListenSocket;

	bool m_Connected;
	bool m_PendingConnection;
	CMySocket m_ConnectedSocket;
};

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

#endif // !defined(AFX_TCPSERVERDLG_H__5742D5B0_863A_46E2_B770_558F0C351FB8__INCLUDED_)
