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_link_8h_source.html | 230 ++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 Doc/doxygen/html/_net_link_8h_source.html (limited to 'Doc/doxygen/html/_net_link_8h_source.html') diff --git a/Doc/doxygen/html/_net_link_8h_source.html b/Doc/doxygen/html/_net_link_8h_source.html new file mode 100644 index 0000000..02cafca --- /dev/null +++ b/Doc/doxygen/html/_net_link_8h_source.html @@ -0,0 +1,230 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/NetEx/NetLink.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
NetLink.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: NetLink.h
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Network Link for Remote Player
+
13 */
+
14 
+
15 
+
16 #ifndef NetLink_h
+
17 #define NetLink_h
+
18 
+
19 #include <windows.h>
+
20 #include "NetAddr.h"
+
21 #include "NetSock.h"
+
22 #include "List.h"
+
23 #include "ThreadSync.h"
+
24 
+
25 // +-------------------------------------------------------------------+
+
26 
+
27 class NetGram;
+
28 class NetMsg;
+
29 class NetPeer;
+
30 
+
31 // +-------------------------------------------------------------------+
+
32 
+
33 class NetLink
+
34 {
+
35 public:
+
36  static const char* TYPENAME() { return "NetLink"; }
+
37 
+
38  NetLink();
+
39  NetLink(NetAddr& a);
+
40  virtual ~NetLink();
+
41 
+
42  int operator == (const NetLink& that) const { return this == &that; }
+
43 
+
44  const NetAddr& GetAddress() const { return addr; }
+
45 
+
46  DWORD AddPeer(const char* a, WORD p=12345);
+
47  DWORD AddPeer(DWORD a, WORD p=12345);
+
48  DWORD AddPeer(const NetAddr& a);
+
49 
+
50  bool SendMessage(DWORD nid, void* d, int l, BYTE f=0);
+
51  bool SendMessage(DWORD nid, BYTE type, const char* text, int len, BYTE f=0);
+
52  bool SendMessage(NetMsg* msg);
+
53 
+
54  NetMsg* GetMessage();
+
55  NetMsg* GetMessage(DWORD netid);
+
56 
+
57  virtual void Shutdown();
+
58  DWORD DoSendRecv();
+
59 
+
60  DWORD GetResendInterval() const { return resend_time; }
+
61  void SetResendInterval(DWORD t) { resend_time = t; }
+
62  DWORD GetTrafficInterval() const { return traffic_time; }
+
63  void SetTrafficInterval(DWORD t) { traffic_time = t; }
+
64 
+
65  DWORD GetPacketsSent() const { return packets_sent; }
+
66  DWORD GetPacketsRecv() const { return packets_recv; }
+
67  DWORD GetBytesSent() const { return bytes_sent; }
+
68  DWORD GetBytesRecv() const { return bytes_recv; }
+
69  DWORD GetRetries() const { return retries; }
+
70  DWORD GetDrops() const { return drops; }
+
71  DWORD GetLag() const { return lag; }
+
72 
+
73  NetPeer* FindPeer(const NetAddr& a);
+
74  NetPeer* FindPeer(DWORD netid);
+
75 
+
76 protected:
+
77  void SendNetGram(NetGram* g);
+ +
79  void AckNetGram(NetGram* gram);
+
80  void ProcessAck(NetGram* gram);
+
81  void QueueNetGram(NetGram* gram);
+
82 
+
83  void ReadPackets();
+
84  void SendPackets();
+
85  void DoRetries();
+
86 
+ + + + + +
92 
+
93  HANDLE hnet;
+
94  bool shutdown;
+ +
96 
+
97  DWORD resend_time;
+
98  DWORD traffic_time;
+
99 
+ + +
102  DWORD bytes_sent;
+
103  DWORD bytes_recv;
+
104  DWORD retries;
+
105  DWORD drops;
+
106  DWORD lag;
+
107 
+
108  DWORD lag_samples[10];
+ +
110 };
+
111 
+
112 
+
113 #endif NetLink_h
+
+
+ + + + -- cgit v1.1