Line | |
---|
1 | /*! |
---|
2 | * @file network_monitor.h |
---|
3 | * a class to monitor the network: throughput, network nodes |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _NETWORK_MONITOR_H |
---|
7 | #define _NETWORK_MONITOR_H |
---|
8 | |
---|
9 | #include "base_object.h" |
---|
10 | #include "synchronizeable.h" |
---|
11 | |
---|
12 | #include <list> |
---|
13 | |
---|
14 | class NetworkStream; |
---|
15 | class PeerInfo; |
---|
16 | |
---|
17 | |
---|
18 | class NetworkMonitor : public Synchronizeable |
---|
19 | { |
---|
20 | |
---|
21 | public: |
---|
22 | NetworkMonitor(NetworkStream* networkStream); |
---|
23 | virtual ~NetworkMonitor(); |
---|
24 | |
---|
25 | |
---|
26 | void addClient(PeerInfo* node); |
---|
27 | void addProxyServer(PeerInfo* node); |
---|
28 | void addMasterServer(PeerInfor* node); |
---|
29 | |
---|
30 | void removeClient(PeerInfor* node); |
---|
31 | void removeProxyServer(PeerInfor* node); |
---|
32 | void removeMasterServer(PeerInfor* node); |
---|
33 | |
---|
34 | |
---|
35 | void process(); |
---|
36 | |
---|
37 | |
---|
38 | private: |
---|
39 | std::list<PeerInfo*> clientList; //!< list of all clients in the network |
---|
40 | std::list<PeerInfo*> proxyServerList; //!< list of all proxy servers in the network |
---|
41 | std::list<PeerInfo*> masterServerList; //!< list of all master servers in the network (should be 1!! :D) |
---|
42 | }; |
---|
43 | |
---|
44 | |
---|
45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.