From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_net_addr_8h_source.html | 175 ++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 Doc/doxygen/html/_net_addr_8h_source.html (limited to 'Doc/doxygen/html/_net_addr_8h_source.html') diff --git a/Doc/doxygen/html/_net_addr_8h_source.html b/Doc/doxygen/html/_net_addr_8h_source.html new file mode 100644 index 0000000..865f1f5 --- /dev/null +++ b/Doc/doxygen/html/_net_addr_8h_source.html @@ -0,0 +1,175 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/NetEx/NetAddr.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
NetAddr.h
+
+
+Go to the documentation of this file.
1 /* Project nGenEx
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: NetEx.lib
+
6  FILE: NetAddr.h
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Network Address (specifically, Internet Protocol)
+
13 */
+
14 
+
15 
+
16 #ifndef NetAddr_h
+
17 #define NetAddr_h
+
18 
+
19 #include <windows.h>
+
20 
+
21 // +-------------------------------------------------------------------+
+
22 
+
23 class NetAddr
+
24 {
+
25 public:
+
26  static const char* TYPENAME() { return "NetAddr"; }
+
27 
+
28  NetAddr(const char* a, WORD p=0);
+
29  NetAddr(DWORD a=0, WORD p=0);
+
30  NetAddr(const NetAddr& n);
+
31 
+
32  int operator == (const NetAddr& a) const { return addr==a.addr && port==a.port; }
+
33 
+
34  DWORD IPAddr() const { return addr; }
+
35  BYTE B4() const { return (BYTE) ((addr & 0xff000000) >> 24); }
+
36  BYTE B3() const { return (BYTE) ((addr & 0x00ff0000) >> 16); }
+
37  BYTE B2() const { return (BYTE) ((addr & 0x0000ff00) >> 8); }
+
38  BYTE B1() const { return (BYTE) ((addr & 0x000000ff) ); }
+
39 
+
40  WORD Port() const { return port; }
+
41  void SetPort(WORD p) { port = p; }
+
42 
+
43  sockaddr* GetSockAddr() const;
+
44  size_t GetSockAddrLength() const;
+
45 
+
46  void SetSockAddr(sockaddr* s, int size);
+
47  void InitFromSockAddr();
+
48 
+
49 private:
+
50  void Init();
+
51 
+
52  DWORD addr; // IP addr in host byte order
+
53  WORD port; // IP port in host byte order
+
54  sockaddr_in sadr;
+
55 };
+
56 
+
57 
+
58 #endif NetAddr_h
+
+
+ + + + -- cgit v1.1