1 |
ab11 |
1.1 |
#include <iostream> |
2 |
|
|
#include <string> |
3 |
ab11 |
1.3 |
#include "socket++-1.10/sockinet.h" |
4 |
ab11 |
1.4 |
#include "SubNet.h" |
5 |
ab11 |
1.1 |
|
6 |
|
|
using std::string; |
7 |
|
|
|
8 |
|
|
class SmallNet { |
9 |
|
|
|
10 |
|
|
public: |
11 |
|
|
// constructor |
12 |
ab11 |
1.3 |
SmallNet(int printDebug); |
13 |
ab11 |
1.1 |
// heartbeat section |
14 |
|
|
int connectHeartBeat(string host, int port); |
15 |
|
|
string heartBeatSend(string text); |
16 |
ab11 |
1.5 |
void closeHeartBeatConnection(); |
17 |
ab11 |
1.1 |
// config section |
18 |
ab11 |
1.3 |
int connectConfig(string host,int port); |
19 |
ab11 |
1.1 |
string configSend(string text); |
20 |
|
|
void closeConfigConnection(); |
21 |
|
|
// misc stuff |
22 |
ab11 |
1.3 |
void sendUPDPacket( string host, int port, string message ); |
23 |
ab11 |
1.1 |
private: |
24 |
ab11 |
1.3 |
|
25 |
ab11 |
1.5 |
int debug; // print debug info? |
26 |
ab11 |
1.3 |
iosockinet * socket; // TCP socket |
27 |
ab11 |
1.5 |
SubNet * ssocket; // TCP/UDP Socket |
28 |
|
|
|
29 |
ab11 |
1.1 |
}; // class |