2018-01-12 19:15:08 +08:00
|
|
|
#pragma once
|
2018-01-28 12:34:23 +08:00
|
|
|
|
|
|
|
class CWinEchodDlg;
|
|
|
|
|
2018-01-12 19:15:08 +08:00
|
|
|
class CFiberConnect : public acl::fiber
|
|
|
|
{
|
|
|
|
public:
|
2018-01-28 12:34:23 +08:00
|
|
|
CFiberConnect(CWinEchodDlg& hWin, const char* serverAddr, int count);
|
2018-01-12 19:15:08 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
~CFiberConnect(void);
|
|
|
|
|
|
|
|
// @override
|
|
|
|
void run(void);
|
|
|
|
|
|
|
|
private:
|
2018-01-28 12:34:23 +08:00
|
|
|
CWinEchodDlg& m_hWin;
|
2018-01-13 23:24:45 +08:00
|
|
|
acl::string m_serverAddr;
|
|
|
|
int m_count;
|
2018-01-12 22:29:21 +08:00
|
|
|
|
2018-01-14 22:54:44 +08:00
|
|
|
void doEcho(socket_t sock);
|
|
|
|
void doEcho(acl::socket_stream& conn);
|
2018-01-12 19:15:08 +08:00
|
|
|
};
|
|
|
|
|