00001 #ifndef KEEPALIVE_CLIENTBASE__H
00002 #define KEEPALIVE_CLIENTBASE__H
00003
00004 namespace Keepalive
00005 {
00006
00007 class ClientBase
00008 {
00009 public:
00010 ClientBase(int mode, const char *host, int port);
00011 ~ClientBase();
00012
00013 enum SocketModes
00014 {
00015 TCPSocket,
00016 UDPSocket
00017 };
00018
00019 protected:
00020 int connect(int mode, const char *socketfile);
00021 int serverconnect(int mode, const char *host, int port);
00022
00023 char *m_host;
00024 int m_port;
00025 int m_fd;
00026 };
00027
00028 };
00029
00030 #endif
00031