Click here to Skip to main content
15,896,557 members
Articles / High Performance Computing / Parallel Processing

Use of free SocketPro package for creating super client and server applications

Rate me:
Please Sign up or sign in to vote.
4.48/5 (19 votes)
23 Feb 200211 min read 181.2K   6.3K   59  
A set of socket libraries for writing distributed computing applications over the internet
// SpeedTestDlg.h : header file
//

#if !defined(AFX_SPEEDTESTDLG_H__F0E994FD_24DF_4B98_BB84_82443229337B__INCLUDED_)
#define AFX_SPEEDTESTDLG_H__F0E994FD_24DF_4B98_BB84_82443229337B__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CSpeedTestDlg dialog
#include <AsySocket.h>

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

// Dialog Data
	//{{AFX_DATA(CSpeedTestDlg)
	enum { IDD = IDD_SPEEDTEST_DIALOG };
	CString	m_strClients;
	CString	m_strHost;
	UINT	m_nPort;
	DWORD	m_dwTime;
	DWORD	m_dwStart;
	UINT	m_nBytes;
	UINT	m_nNagleTime;
	BOOL	m_bNagle;
	UINT	m_nRepeat;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSpeedTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
	
	virtual bool Run();
	virtual void OnConnect(WPARAM hSocket,  LPARAM lError);
	virtual void OnClose(WPARAM hSocket,  LPARAM lError);

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CSpeedTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnConnectButton();
	afx_msg void OnDisconnectButton();
	afx_msg void OnAsynNagleButton();
	afx_msg void OnAsynBatchButton();
	afx_msg void OnSynOneButton();
	afx_msg void OnDestroy();
	afx_msg void OnNagleCheck();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_SPEEDTESTDLG_H__F0E994FD_24DF_4B98_BB84_82443229337B__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United States United States
Yuancai (Charlie) Ye, an experienced C/C++ software engineer, lives in Atlanta, Georgia. He is an expert at continuous inline request/result batching, real-time stream processing, asynchronous data transferring and parallel computation for the best communication throughput and latency. He has been working at SocketPro (https://github.com/udaparts/socketpro) for more than fifteen years.

Comments and Discussions