Debian Codegraph @

src/networking/netnode.h

raw symbols SCIP
1 /***************************************************************************
2 netnode.h - description
3 -------------------
4 begin : dec 23th, 2004
5 copyright : (C) 2004-2006 by Duong Khang NGUYEN
6 email : neoneurone @ gmail com
7
8 $Id: netnode.h 375 2008-10-28 14:47:15Z neoneurone $
9 ***************************************************************************/
10
11 /***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * any later version. *
17 * *
18 ***************************************************************************/
19
20 #ifndef _OPENCITY_NETNODE_H_
21 #define _OPENCITY_NETNODE_H_ 1
22
23 #include "main.h"
24
25 #include "SDL_net.h"
26
27
28 //========================================================================
29 /** This is a helper class of the "Networking" class. Each host is
30 considered as a "Netnode" by the networking layer.
31 */
32 class Netnode {
33 public:
34 Netnode() {}
35 Netnode( IPaddress ipAdr, TCPsocket sock ):ip(ipAdr), socket(sock) {}
36 bool operator==( const Netnode& rc ) {
37 return ((this->ip.host == rc.ip.host) && (this->ip.port == rc.ip.port)
38 && (this->socket == rc.socket));
39 }
40
41 ~Netnode() {}
42
43 IPaddress ip;
44 TCPsocket socket;
45 private:
46 };
47
48 #endif
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77