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