📄 dogclient.h
字号:
/*+============================================================================
File: DogClient.h
Summary: Watch dog client timer class.
History:
2000/07/12 V1.0
Start it by shencan@263.net
2000/07/19 V1.1
Use UDP to transport message. (shencan@263.net)
============================================================================+*/
#ifndef _DOGCLIENT_H
#define _DOGCLIENT_H
//#include "ace/OS.h"
//#include /**/ "ace/SOCK_Dgram.h"
//#include /**/ "ace/INET_Addr.h"
#include <winsock.h>
#include <ptlib.h>
#include <ptclib/socks.h>
#include "watchdog.h"
#include "global.h"
class CDogClient
{
// = TITLE
// Target of the asynchronous timeout operation.
public:
CDogClient();
~CDogClient();
int Close();
int Init();
int SendMsg(MessageCode code, char * msg);
static CDogClient * Instance()
{
if ( m_instance == NULL )
m_instance = new CDogClient;
return m_instance;
}
static CDogClient * m_instance;
static int id;
private:
// PTCPSocket * m_sock;
/// PIPSocket::Address m_addr;
struct sockaddr_in m_srv;
int m_sock;
int m_retcode;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -