-
- bool MakeOutboundConnection(char* host, int port);
- std::string GetServerName();
- void SetServerName(std::string serv);
- int GetDescriptor();
- void SetDescriptor(int fd);
- int GetState();
- void SetState(int state);
- char* GetServerIP();
- std::string GetDescription();
- void SetDescription(std::string desc);
- int GetServerPort();
- bool SetHostAndPort(char* host, int port);
-};
-
-
-class packet : public classbase
-{
- public:
- long key;
- int id;
- short int type;
- char data[MAXBUF];
-
- packet();
- ~packet();
-};
-
-
-class connection : public classbase
-{
- public:
- long key;
- int fd; // file descriptor
- char host[256]; // hostname
- long ip; // ipv4 address
- char inbuf[MAXBUF]; // recvQ
- long bytes_in;
- long bytes_out;
- long cmds_in;
- long cmds_out;
- bool haspassed;
- int port;
- int registered;
- short int state;