Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/peer_info.h @ 9285

Last change on this file since 9285 was 9282, checked in by patrick, 18 years ago

another framework switch, and node registration work

File size: 976 bytes
Line 
1/*!
2 * @file peer_info.h
3 *  implementation a peer info
4 */
5
6#ifndef _PEER_INFO_H
7#define _PEER_INFO_H
8
9#include "server_socket.h"
10#include "handshake.h"
11#include "monitor/connection_monitor.h"
12
13
14//!< this structure contains informations about the network node
15class PeerInfo
16{
17  public:
18    PeerInfo();
19
20    void clear();
21
22
23    inline bool isMasterServer() { return this->nodeType == NET_MASTER_SERVER; }
24    inline bool isProxyServer() { return this->nodeType == NET_PROXY_SERVER; }
25    inline bool isClient() { return this->nodeType == NET_CLIENT; }
26
27
28  public:
29    int                 userId;
30    int                 nodeType;
31//     bool                isMasterServer;
32//     bool                isProxyServer;
33//     bool                isClient;
34    NetworkSocket *     socket;
35    Handshake *         handshake;
36    ConnectionMonitor * connectionMonitor;
37    int                 lastAckedState;
38    int                 lastRecvedState;
39};
40
41
42
43#endif /* _PEER_INFO_H */
Note: See TracBrowser for help on using the repository browser.