ReplicaNet and RNLobby  1
TransportConfig.h
1 /* START_LICENSE_HEADER
2 
3 Copyright (C) 2000 Martin Piper, original design and program code
4 Copyright (C) 2001 Replica Software
5 
6 This program file is copyright (C) Replica Software and can only be used under license.
7 For more information visit: http://www.replicanet.com/
8 Or email: info@replicanet.com
9 
10 END_LICENSE_HEADER */
11 #include "RNPlatform/Inc/MemoryTracking.h"
12 #ifndef _TRANSPORTCONFIG_H_
13 #define _TRANSPORTCONFIG_H_
14 #include <string>
15 
16 namespace RNReplicaNet
17 {
18 
19 const int kUDPIPHeaderBytes = 42; // The number of bytes used by the network stack IP header information on the wire for UDP packets
20 
26 {
27 public:
34  static void SetResendTimes(const int numberOfTimes,const float *retryTimes);
35 
41  static void GetResendTimes(int *numberOfTimes,float *retryTimes);
42 
53  static void SetPacketBufferTime(const float maxTime = 0.01f);
54 
59  static float GetPacketBufferTime(void);
60 
67  static void PacketBufferBeginCaptureWindow(void);
68 
73  static void PacketBufferEndCaptureWindow(const bool kickBuffer = true);
74 
82  static void SetPacketBufferEnable(const bool enable = true);
83 
88  static bool GetPacketBufferEnable(void);
89 
96  static void SetPacketMTU(const int bytes = 1306);
97 
102  static int GetPacketMTU(void);
103 
108  static void SetExternalIP(const std::string address = "");
109 
114  static std::string GetExternalIP(void);
115 
120  static void SetInfoString(const std::string info = "");
121 
126  static std::string GetInfoString(void);
127 
132  static void SetExtraPacketSecurity(const bool enable = true);
133 
138  static bool GetExtraPacketSecurity(void);
139 
144  static void SetIPv4Detection(const bool enable = true);
145  static bool GetIPv4Detection(void);
146 
151  static void SetIPv6Detection(const bool enable = false);
152  static bool GetIPv6Detection(void);
153 
157  static void SetIPv4Detected(const bool enable = true);
158  static bool GetIPv4Detected(void);
159 
163  static void SetIPv6Detected(const bool enable = false);
164  static bool GetIPv6Detected(void);
165 
170  static size_t GetTransparentPacketCompressionBytesSaved(const bool reset = false);
171 
177  static void SetEnablePacketSelect(const bool enable = false);
178 
183  static bool GetEnablePacketSelect(void);
184 
185 private:
186  TransportConfig() {};
187 };
188 
189 } // namespace RNReplicaNet
190 
191 #endif
static void SetExtraPacketSecurity(const bool enable=true)
static bool GetPacketBufferEnable(void)
static void SetIPv6Detected(const bool enable=false)
static std::string GetExternalIP(void)
static void SetPacketBufferEnable(const bool enable=true)
static void PacketBufferBeginCaptureWindow(void)
static int GetPacketMTU(void)
static void SetInfoString(const std::string info="")
Definition: TransportConfig.h:25
static void SetIPv4Detection(const bool enable=true)
static void SetIPv6Detection(const bool enable=false)
static float GetPacketBufferTime(void)
static void PacketBufferEndCaptureWindow(const bool kickBuffer=true)
static void SetIPv4Detected(const bool enable=true)
static void SetExternalIP(const std::string address="")
static void SetPacketBufferTime(const float maxTime=0.01f)
static void SetPacketMTU(const int bytes=1306)
static bool GetExtraPacketSecurity(void)
static std::string GetInfoString(void)
static void SetEnablePacketSelect(const bool enable=false)
static void GetResendTimes(int *numberOfTimes, float *retryTimes)
static size_t GetTransparentPacketCompressionBytesSaved(const bool reset=false)
static bool GetEnablePacketSelect(void)
static void SetResendTimes(const int numberOfTimes, const float *retryTimes)