LeviLamina
Loading...
Searching...
No Matches
RakPeer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/raknet/AddressOrGUID.h"
7#include "mc/deps/raknet/BitStream.h"
8#include "mc/deps/raknet/ConnectionAttemptResult.h"
9#include "mc/deps/raknet/ConnectionState.h"
10#include "mc/deps/raknet/NetworkAdapter.h"
11#include "mc/deps/raknet/PacketPriority.h"
12#include "mc/deps/raknet/PacketReliability.h"
13#include "mc/deps/raknet/PublicKeyMode.h"
14#include "mc/deps/raknet/RNS2EventHandler.h"
15#include "mc/deps/raknet/RakNetGUID.h"
16#include "mc/deps/raknet/RakPeerInterface.h"
17#include "mc/deps/raknet/ReliabilityLayer.h"
18#include "mc/deps/raknet/SignaledEvent.h"
19#include "mc/deps/raknet/SimpleMutex.h"
20#include "mc/deps/raknet/StartupResult.h"
21#include "mc/deps/raknet/SystemAddress.h"
22#include "mc/deps/raknet/data_structures/List.h"
23#include "mc/deps/raknet/data_structures/MemoryPool.h"
24#include "mc/deps/raknet/data_structures/Queue.h"
25#include "mc/deps/raknet/data_structures/ThreadsafeAllocatingQueue.h"
26
27// auto generated forward declare list
28// clang-format off
29namespace RakNet { class PluginInterface2; }
30namespace RakNet { class RakNetSocket2; }
31namespace RakNet { class RakString; }
32namespace RakNet { class ShadowBanList; }
33namespace RakNet { struct Packet; }
34namespace RakNet { struct PublicKey; }
35namespace RakNet { struct RNS2RecvStruct; }
36namespace RakNet { struct RakNetStatistics; }
37namespace RakNet { struct RemoteSystemIndex; }
38namespace RakNet { struct SocketDescriptor; }
39// clang-format on
40
41namespace RakNet {
42
44public:
45 // RakPeer inner types declare
46 // clang-format off
47 struct BanStruct;
49 struct RemoteSystemStruct;
52 struct SocketQueryOutput;
53 // clang-format on
54
55 // RakPeer inner types define
56 enum : int {
57 RequestedConnectionListMutex = 0,
58 OfflinePingResponseMutex = 1,
59 NumberOfRakpeerMutexes = 2,
60 };
61
62 struct BanStruct {
63 public:
64 // member variables
65 // NOLINTBEGIN
66 ::ll::TypedStorage<8, 8, char*> IP;
67 ::ll::TypedStorage<4, 4, uint> timeout;
68 // NOLINTEND
69 };
70
72 public:
73 // member variables
74 // NOLINTBEGIN
75 ::ll::TypedStorage<2, 2, ushort> pingTime;
76 ::ll::TypedStorage<8, 8, uint64> clockDifferential;
77 // NOLINTEND
78 };
79
80 struct RemoteSystemStruct {
81 public:
82 // RemoteSystemStruct inner types define
83 enum class ConnectMode : int {
84 NoAction = 0,
85 DisconnectAsap = 1,
86 DisconnectAsapSilently = 2,
87 DisconnectOnNoAck = 3,
88 RequestedConnection = 4,
89 HandlingConnectionRequest = 5,
90 UnverifiedSender = 6,
91 Connected = 7,
92 };
93
94 public:
95 // member variables
96 // NOLINTBEGIN
97 ::ll::TypedStorage<1, 1, bool> isActive;
98 ::ll::TypedStorage<8, 136, ::RakNet::SystemAddress> systemAddress;
99 ::ll::TypedStorage<8, 136, ::RakNet::SystemAddress> myExternalSystemAddress;
100 ::ll::TypedStorage<8, 2720, ::RakNet::SystemAddress[20]> theirInternalSystemAddress;
101 ::ll::TypedStorage<8, 6704, ::RakNet::ReliabilityLayer> reliabilityLayer;
102 ::ll::TypedStorage<1, 1, bool> weInitiatedTheConnection;
103 ::ll::TypedStorage<8, 80, ::RakNet::RakPeer::PingAndClockDifferential[5]> pingAndClockDifferential;
104 ::ll::TypedStorage<8, 8, uint64> pingAndClockDifferentialWriteIndex;
105 ::ll::TypedStorage<2, 2, ushort> lowestPing;
106 ::ll::TypedStorage<8, 8, uint64> nextPingTime;
107 ::ll::TypedStorage<8, 8, uint64> lastReliableSend;
108 ::ll::TypedStorage<8, 8, uint64> connectionTime;
109 ::ll::TypedStorage<8, 16, ::RakNet::RakNetGUID> guid;
110 ::ll::TypedStorage<4, 4, int> MTUSize;
111 ::ll::TypedStorage<8, 8, ::RakNet::RakNetSocket2*> rakNetSocket;
112 ::ll::TypedStorage<2, 2, ushort> remoteSystemIndex;
113 ::ll::TypedStorage<4, 4, ::RakNet::RakPeer::RemoteSystemStruct::ConnectMode> connectMode;
114 ::ll::TypedStorage<1, 1, bool> applicationHandshakeCompleted;
115 // NOLINTEND
116
117 public:
118 // member functions
119 // NOLINTBEGIN
120 MCAPI RemoteSystemStruct();
121
122 MCAPI ~RemoteSystemStruct();
123 // NOLINTEND
124
125 public:
126 // constructor thunks
127 // NOLINTBEGIN
128 MCAPI void* $ctor();
129 // NOLINTEND
130
131 public:
132 // destructor thunk
133 // NOLINTBEGIN
134 MCAPI void $dtor();
135 // NOLINTEND
136 };
137
139 public:
140 // member variables
141 // NOLINTBEGIN
142 ::ll::TypedStorage<4, 4, uint> numberOfBitsToSend;
143 ::ll::TypedStorage<4, 4, ::PacketPriority> priority;
144 ::ll::TypedStorage<4, 4, ::PacketReliability> reliability;
145 ::ll::TypedStorage<1, 1, char> orderingChannel;
146 ::ll::TypedStorage<8, 152, ::RakNet::AddressOrGUID> systemIdentifier;
147 ::ll::TypedStorage<1, 1, bool> broadcast;
148 ::ll::TypedStorage<4, 4, ::RakNet::RakPeer::RemoteSystemStruct::ConnectMode> connectionMode;
149 ::ll::TypedStorage<8, 8, uint64> networkID;
150 ::ll::TypedStorage<1, 1, bool> blockingCommand;
151 ::ll::TypedStorage<8, 8, char*> data;
152 ::ll::TypedStorage<1, 1, bool> haveRakNetCloseSocket;
153 ::ll::TypedStorage<4, 4, uint> connectionSocketIndex;
154 ::ll::TypedStorage<2, 2, ushort> remotePortRakNetWasStartedOn_PS3;
155 ::ll::TypedStorage<4, 4, uint> extraSocketOptions;
156 ::ll::TypedStorage<8, 8, ::RakNet::RakNetSocket2*> socket;
157 ::ll::TypedStorage<2, 2, ushort> port;
158 ::ll::TypedStorage<4, 4, uint> receipt;
159 enum : int {
160 Send = 0,
161 CloseConnection = 1,
162 GetSocket = 2,
163 ChangeSystemAddress = 3,
164 DoNothing = 4,
165 } command;
166 // NOLINTEND
167 };
168
170 public:
171 // member variables
172 // NOLINTBEGIN
173 ::ll::TypedStorage<8, 136, ::RakNet::SystemAddress> systemAddress;
174 ::ll::TypedStorage<8, 8, uint64> nextRequestTime;
175 ::ll::TypedStorage<1, 1, uchar> requestsMade;
176 ::ll::TypedStorage<8, 8, char*> data;
177 ::ll::TypedStorage<2, 2, ushort> dataLength;
178 ::ll::TypedStorage<1, 256, char[256]> outgoingPassword;
179 ::ll::TypedStorage<1, 1, uchar> outgoingPasswordLength;
180 ::ll::TypedStorage<4, 4, uint> socketIndex;
181 ::ll::TypedStorage<4, 4, uint> extraData;
182 ::ll::TypedStorage<4, 4, uint> sendConnectionAttemptCount;
183 ::ll::TypedStorage<4, 4, uint> timeBetweenSendConnectionAttemptsMS;
184 ::ll::TypedStorage<4, 4, uint> timeoutTime;
185 ::ll::TypedStorage<4, 4, ::RakNet::PublicKeyMode> publicKeyMode;
186 ::ll::TypedStorage<8, 8, ::RakNet::RakNetSocket2*> socket;
187 enum : int {
188 Connect = 1,
189 } actionToTake;
190 // NOLINTEND
191 };
192
194 public:
195 // member variables
196 // NOLINTBEGIN
197 ::ll::TypedStorage<8, 16, ::DataStructures::List<::RakNet::RakNetSocket2*>> sockets;
198 // NOLINTEND
199 };
200
201public:
202 // member variables
203 // NOLINTBEGIN
204 ::ll::TypedStorage<1, 1, bool volatile> endThreads;
205 ::ll::TypedStorage<1, 1, bool volatile> isMainLoopThreadActive;
206 ::ll::TypedStorage<1, 1, bool> occasionalPing;
207 ::ll::TypedStorage<4, 4, uint> maximumNumberOfPeers;
208 ::ll::TypedStorage<4, 4, uint> maximumIncomingConnections;
209 ::ll::TypedStorage<8, 288, ::RakNet::BitStream> offlinePingResponse;
210 ::ll::TypedStorage<1, 256, char[256]> incomingPassword;
211 ::ll::TypedStorage<1, 1, uchar> incomingPasswordLength;
212 ::ll::TypedStorage<8, 8, ::RakNet::RakPeer::RemoteSystemStruct*> remoteSystemList;
213 ::ll::TypedStorage<8, 8, ::RakNet::RakPeer::RemoteSystemStruct**> activeSystemList;
214 ::ll::TypedStorage<4, 4, uint> activeSystemListSize;
215 ::ll::TypedStorage<8, 8, ::RakNet::RemoteSystemIndex**> remoteSystemLookup;
216 ::ll::TypedStorage<8, 32, ::DataStructures::MemoryPool<::RakNet::RemoteSystemIndex>> remoteSystemIndexPool;
217 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RakNet::ShadowBanList>> shadowBanList;
218 ::ll::TypedStorage<8, 80, ::RakNet::SimpleMutex[2]> rakPeerMutexes;
219 ::ll::TypedStorage<1, 1, bool> updateCycleIsRunning;
220 ::ll::TypedStorage<4, 4, uint> bytesSentPerSecond;
221 ::ll::TypedStorage<4, 4, uint> bytesReceivedPerSecond;
222 ::ll::TypedStorage<4, 4, uint> validationInteger;
223 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> incomingQueueMutex;
224 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> banListMutex;
225 ::ll::TypedStorage<8, 16, ::DataStructures::List<::RakNet::RakPeer::BanStruct*>> banList;
226 ::ll::TypedStorage<8, 16, ::DataStructures::List<::RakNet::PluginInterface2*>> pluginListTS;
227 ::ll::TypedStorage<8, 16, ::DataStructures::List<::RakNet::PluginInterface2*>> pluginListNTS;
228 ::ll::TypedStorage<8, 24, ::DataStructures::Queue<::RakNet::RakPeer::RequestedConnectionStruct*>>
229 requestedConnectionQueue;
230 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> requestedConnectionQueueMutex;
231 ::ll::TypedStorage<8, 136, ::DataStructures::ThreadsafeAllocatingQueue<::RakNet::RakPeer::BufferedCommandStruct>>
232 bufferedCommands;
233 ::ll::TypedStorage<8, 24, ::DataStructures::Queue<::RakNet::RNS2RecvStruct*>> bufferedPacketsFreePool;
234 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> bufferedPacketsFreePoolMutex;
235 ::ll::TypedStorage<8, 24, ::DataStructures::Queue<::RakNet::RNS2RecvStruct*>> bufferedPacketsQueue;
236 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> bufferedPacketsQueueMutex;
237 ::ll::TypedStorage<8, 136, ::DataStructures::ThreadsafeAllocatingQueue<::RakNet::RakPeer::SocketQueryOutput>>
238 socketQueryOutput;
239 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> securityExceptionMutex;
240 ::ll::TypedStorage<4, 4, int> defaultMTUSize;
241 ::ll::TypedStorage<1, 1, bool> trackFrequencyTable;
242 ::ll::TypedStorage<8, 16, ::DataStructures::List<::std::shared_ptr<::RakNet::RakNetSocket2>>> socketList;
243 ::ll::TypedStorage<8, 8, ::RakNet::BitStream*> replyFromTargetBS;
244 ::ll::TypedStorage<8, 136, ::RakNet::SystemAddress> replyFromTargetPlayer;
245 ::ll::TypedStorage<1, 1, bool> replyFromTargetBroadcast;
246 ::ll::TypedStorage<4, 4, uint> defaultTimeoutTime;
247 ::ll::TypedStorage<8, 16, ::RakNet::RakNetGUID> myGuid;
248 ::ll::TypedStorage<4, 4, uint> maxOutgoingBPS;
249 ::ll::TypedStorage<1, 1, bool> allowConnectionResponseIPMigration;
250 ::ll::TypedStorage<8, 136, ::RakNet::SystemAddress> firstExternalID;
251 ::ll::TypedStorage<4, 4, int> splitMessageProgressInterval;
252 ::ll::TypedStorage<4, 4, uint> unreliableTimeout;
253 ::ll::TypedStorage<8, 8, bool (*)(::RakNet::RNS2RecvStruct*)> incomingDatagramEventHandler;
254 ::ll::TypedStorage<8, 16, ::DataStructures::List<::RakNet::RakString>> securityExceptionList;
255 ::ll::TypedStorage<8, 2856, ::RakNet::SystemAddress[21]> ipList;
256 ::ll::TypedStorage<8, 31592, ::RakNet::NetworkAdapter[11]> adapterList;
257 ::ll::TypedStorage<1, 1, bool> allowInternalRouting;
258 ::ll::TypedStorage<1, 1, bool> allowUnconnectedPings;
259 ::ll::TypedStorage<8, 8, void (*)(::RakNet::RakPeerInterface*, void*)> userUpdateThreadPtr;
260 ::ll::TypedStorage<8, 8, void*> userUpdateThreadData;
261 ::ll::TypedStorage<8, 8, ::RakNet::SignaledEvent> quitAndDataEvents;
262 ::ll::TypedStorage<1, 1, bool> limitConnectionFrequencyFromTheSameIP;
263 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> packetAllocationPoolMutex;
264 ::ll::TypedStorage<8, 32, ::DataStructures::MemoryPool<::RakNet::Packet>> packetAllocationPool;
265 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> packetReturnMutex;
266 ::ll::TypedStorage<8, 24, ::DataStructures::Queue<::RakNet::Packet*>> packetReturnQueue;
267 ::ll::TypedStorage<8, 40, ::RakNet::SimpleMutex> sendReceiptSerialMutex;
268 ::ll::TypedStorage<4, 4, uint> sendReceiptSerial;
269 // NOLINTEND
270
271public:
272 // virtual functions
273 // NOLINTBEGIN
274 virtual ~RakPeer() /*override*/;
275
276 virtual void InitializeConfiguration(::std::unique_ptr<::RakNet::ShadowBanList> banList) /*override*/;
277
278 virtual ::RakNet::StartupResult Startup(
279 uint maxConnections,
280 ::RakNet::SocketDescriptor* socketDescriptors,
281 uint socketDescriptorCount,
282 int threadPriority
283 ) /*override*/;
284
285 virtual bool
286 InitializeSecurity(char const* public_key, char const* private_key, bool bRequireClientKey) /*override*/;
287
288 virtual void DisableSecurity() /*override*/;
289
290 virtual void AddToSecurityExceptionList(char const* ip) /*override*/;
291
292 virtual void RemoveFromSecurityExceptionList(char const* ip) /*override*/;
293
294 virtual bool IsInSecurityExceptionList(char const* ip) /*override*/;
295
296 virtual void SetMaximumIncomingConnections(ushort numberAllowed) /*override*/;
297
298 virtual uint GetMaximumIncomingConnections() const /*override*/;
299
300 virtual ushort NumberOfConnections() const /*override*/;
301
302 virtual void SetIncomingPassword(char const* passwordData, int passwordDataLength) /*override*/;
303
304 virtual void GetIncomingPassword(char* passwordData, int* passwordDataLength) /*override*/;
305
306 virtual ::RakNet::ConnectionAttemptResult Connect(
307 char const* host,
308 ushort remotePort,
309 char const* passwordData,
310 int passwordDataLength,
311 ::RakNet::PublicKey* publicKey,
312 uint connectionSocketIndex,
313 uint sendConnectionAttemptCount,
314 uint timeBetweenSendConnectionAttemptsMS,
315 uint timeoutTime
316 ) /*override*/;
317
318 virtual ::RakNet::ConnectionAttemptResult ConnectWithSocket(
319 char const* host,
320 ushort remotePort,
321 char const* passwordData,
322 int passwordDataLength,
323 ::RakNet::RakNetSocket2* socket,
324 ::RakNet::PublicKey* publicKey,
325 uint sendConnectionAttemptCount,
326 uint timeBetweenSendConnectionAttemptsMS,
327 uint timeoutTime
328 ) /*override*/;
329
330 virtual void Shutdown(
331 uint blockDuration,
332 uchar orderingChannel,
333 ::PacketPriority disconnectionNotificationPriority
334 ) /*override*/;
335
336 virtual bool SetApplicationHandshakeCompleted(::RakNet::AddressOrGUID systemIdentifier) /*override*/;
337
338 virtual bool IsActive() const /*override*/;
339
340 virtual bool GetConnectionList(::RakNet::SystemAddress* remoteSystems, ushort* numberOfSystems) const /*override*/;
341
342 virtual uint GetNextSendReceipt() /*override*/;
343
344 virtual uint IncrementNextSendReceipt() /*override*/;
345
346 virtual uint Send(
347 char const* data,
348 int const length,
349 ::PacketPriority priority,
350 ::PacketReliability reliability,
351 char orderingChannel,
352 ::RakNet::AddressOrGUID const systemIdentifier,
353 bool broadcast,
354 uint forceReceiptNumber
355 ) /*override*/;
356
357 virtual uint Send(
358 ::RakNet::BitStream const* bitStream,
359 ::PacketPriority priority,
360 ::PacketReliability reliability,
361 char orderingChannel,
362 ::RakNet::AddressOrGUID const systemIdentifier,
363 bool broadcast,
364 uint forceReceiptNumber
365 ) /*override*/;
366
367 virtual void SendLoopback(char const* data, int const length) /*override*/;
368
369 virtual uint SendList(
370 char const** data,
371 int const* lengths,
372 int const numParameters,
373 ::PacketPriority priority,
374 ::PacketReliability reliability,
375 char orderingChannel,
376 ::RakNet::AddressOrGUID const systemIdentifier,
377 bool broadcast,
378 uint forceReceiptNumber
379 ) /*override*/;
380
381 virtual ::RakNet::Packet* Receive() /*override*/;
382
383 virtual void DeallocatePacket(::RakNet::Packet* packet) /*override*/;
384
385 virtual uint GetMaximumNumberOfPeers() const /*override*/;
386
387 virtual void CloseConnection(
388 ::RakNet::AddressOrGUID const target,
389 bool sendDisconnectionNotification,
390 uchar orderingChannel,
391 ::PacketPriority disconnectionNotificationPriority
392 ) /*override*/;
393
394 virtual void CancelConnectionAttempt(::RakNet::SystemAddress const target) /*override*/;
395
396 virtual ::RakNet::ConnectionState GetConnectionState(::RakNet::AddressOrGUID const systemIdentifier) /*override*/;
397
398 virtual int GetIndexFromSystemAddress(::RakNet::SystemAddress const systemAddress) const /*override*/;
399
400 virtual ::RakNet::SystemAddress GetSystemAddressFromIndex(uint index) /*override*/;
401
402 virtual ::RakNet::RakNetGUID GetGUIDFromIndex(uint index) /*override*/;
403
404 virtual void GetSystemList(
405 ::DataStructures::List<::RakNet::SystemAddress>& addresses,
406 ::DataStructures::List<::RakNet::RakNetGUID>& guids
407 ) const /*override*/;
408
409 virtual void AddToBanList(char const* IP, uint milliseconds) /*override*/;
410
411 virtual void RemoveFromBanList(char const* IP) /*override*/;
412
413 virtual void ClearBanList() /*override*/;
414
415 virtual bool IsBanned(char const* IP) /*override*/;
416
417 virtual void SetLimitIPConnectionFrequency(bool b) /*override*/;
418
419 virtual void Ping(::RakNet::SystemAddress const target) /*override*/;
420
421 virtual bool Ping(
422 char const* host,
423 ushort remotePort,
424 bool onlyReplyOnAcceptingConnections,
425 uint connectionSocketIndex
426 ) /*override*/;
427
428 virtual void SendNatTraversalMessage(::RakNet::SystemAddress const target) /*override*/;
429
430 virtual int GetAveragePing(::RakNet::AddressOrGUID const systemIdentifier) /*override*/;
431
432 virtual int GetLastPing(::RakNet::AddressOrGUID const systemIdentifier) const /*override*/;
433
434 virtual int GetLowestPing(::RakNet::AddressOrGUID const systemIdentifier) const /*override*/;
435
436 virtual void SetOccasionalPing(bool doPing) /*override*/;
437
438 virtual uint64 GetClockDifferential(::RakNet::AddressOrGUID const systemIdentifier) /*override*/;
439
440 virtual void SetOfflinePingResponse(char const* data, uint const length) /*override*/;
441
442 virtual void GetOfflinePingResponse(char** data, uint* length) /*override*/;
443
444 virtual ::RakNet::SystemAddress GetInternalID(::RakNet::SystemAddress const systemAddress, int const index) const
445 /*override*/;
446
447 virtual void SetInternalID(::RakNet::SystemAddress systemAddress, int index) /*override*/;
448
449 virtual ::RakNet::SystemAddress GetExternalID(::RakNet::SystemAddress const target) const /*override*/;
450
451 virtual ::RakNet::RakNetGUID const GetMyGUID() const /*override*/;
452
453 virtual void resetMyGUID() /*override*/;
454
455 virtual ::RakNet::SystemAddress GetMyBoundAddress(int const socketIndex) /*override*/;
456
457 virtual void SetAllowUnconnectedPings(bool unconnectedPings) /*override*/;
458
459 virtual bool GetAllowUnconnectedPings() const /*override*/;
460
461 virtual ::RakNet::RakNetGUID const& GetGuidFromSystemAddress(::RakNet::SystemAddress const input) const
462 /*override*/;
463
464 virtual ::RakNet::SystemAddress GetSystemAddressFromGuid(::RakNet::RakNetGUID const input) const /*override*/;
465
466 virtual bool GetClientPublicKeyFromSystemAddress(::RakNet::SystemAddress const input, char* client_public_key) const
467 /*override*/;
468
469 virtual void SetTimeoutTime(uint timeMS, ::RakNet::SystemAddress const target) /*override*/;
470
471 virtual uint GetTimeoutTime(::RakNet::SystemAddress const target) /*override*/;
472
473 virtual int GetMTUSize(::RakNet::SystemAddress const target) const /*override*/;
474
475 virtual uint GetNumberOfAdapters() /*override*/;
476
477 virtual ::RakNet::NetworkAdapter& GetLocalAdapter(uint index) /*override*/;
478
479 virtual uint GetNumberOfAddresses() /*override*/;
480
481 virtual char const* GetLocalIP(uint index) /*override*/;
482
483 virtual bool IsLocalIP(char const* ip) /*override*/;
484
485 virtual void AllowConnectionResponseIPMigration(bool allow) /*override*/;
486
487 virtual bool AdvertiseSystem(
488 char const* host,
489 ushort remotePort,
490 char const* data,
491 int dataLength,
492 uint connectionSocketIndex
493 ) /*override*/;
494
495 virtual void SetSplitMessageProgressInterval(int interval) /*override*/;
496
497 virtual int GetSplitMessageProgressInterval() const /*override*/;
498
499 virtual void SetUnreliableTimeout(uint timeoutMS) /*override*/;
500
501 virtual void SendTTL(char const* host, ushort remotePort, int ttl, uint connectionSocketIndex) /*override*/;
502
503 virtual void AttachPlugin(::RakNet::PluginInterface2* plugin) /*override*/;
504
505 virtual void DetachPlugin(::RakNet::PluginInterface2* plugin) /*override*/;
506
507 virtual void PushBackPacket(::RakNet::Packet* packet, bool pushAtHead) /*override*/;
508
509 virtual void
510 ChangeSystemAddress(::RakNet::RakNetGUID guid, ::RakNet::SystemAddress const& systemAddress) /*override*/;
511
512 virtual ::RakNet::Packet* AllocatePacket(uint dataSize) /*override*/;
513
514 virtual ::RakNet::RakNetSocket2* GetSocket(::RakNet::SystemAddress const target) /*override*/;
515
516 virtual void GetSockets(::DataStructures::List<::RakNet::RakNetSocket2*>& sockets) /*override*/;
517
518 virtual void ReleaseSockets(::DataStructures::List<::RakNet::RakNetSocket2*>& sockets) /*override*/;
519
520 virtual void WriteOutOfBandHeader(::RakNet::BitStream* bitStream) /*override*/;
521
522 virtual void SetUserUpdateThread(
523 void (*_userUpdateThreadPtr)(::RakNet::RakPeerInterface*, void*),
524 void* _userUpdateThreadData
525 ) /*override*/;
526
527 virtual void
528 SetIncomingDatagramEventHandler(bool (*_incomingDatagramEventHandler)(::RakNet::RNS2RecvStruct*)) /*override*/;
529
530 virtual void ApplyNetworkSimulator(float packetloss, ushort minExtraPing, ushort extraPingVariance) /*override*/;
531
532 virtual void SetPerConnectionOutgoingBandwidthLimit(uint maxBitsPerSecond) /*override*/;
533
534 virtual bool IsNetworkSimulatorActive() /*override*/;
535
536 virtual ::RakNet::RakNetStatistics*
537 GetStatistics(::RakNet::SystemAddress const systemAddress, ::RakNet::RakNetStatistics* rns) /*override*/;
538
539 virtual bool GetStatistics(uint const index, ::RakNet::RakNetStatistics* rns) /*override*/;
540
541 virtual void GetStatisticsList(
542 ::DataStructures::List<::RakNet::SystemAddress>& addresses,
543 ::DataStructures::List<::RakNet::RakNetGUID>& guids,
544 ::DataStructures::List<::RakNet::RakNetStatistics>& statistics
545 ) /*override*/;
546
547 virtual uint GetReceiveBufferSize() /*override*/;
548
549 virtual bool RunUpdateCycle(::RakNet::BitStream& updateBitStream) /*override*/;
550
551 virtual bool SendOutOfBand(
552 char const* host,
553 ushort remotePort,
554 char const* data,
555 uint dataLength,
556 uint connectionSocketIndex
557 ) /*override*/;
558
559 virtual void DeallocRNS2RecvStruct(::RakNet::RNS2RecvStruct* s, char const* file, uint line) /*override*/;
560
561 virtual ::RakNet::RNS2RecvStruct* AllocRNS2RecvStruct(char const* file, uint line) /*override*/;
562
563 virtual void OnRNS2Recv(::RakNet::RNS2RecvStruct* recvStruct) /*override*/;
564 // NOLINTEND
565
566public:
567 // member functions
568 // NOLINTBEGIN
569 MCAPI void AddPacketToProducer(::RakNet::Packet* p);
570
571 MCAPI ::RakNet::Packet* AllocPacket(uint dataSize, char const* file, uint line);
572
573 MCAPI ::RakNet::Packet* AllocPacket(uint dataSize, uchar* data, char const* file, uint line);
574
575 MCAPI bool AllowIncomingConnections() const;
576
577 MCAPI ::RakNet::RakPeer::RemoteSystemStruct* AssignSystemAddressToRemoteSystemList(
578 ::RakNet::SystemAddress systemAddress,
579 ::RakNet::RakPeer::RemoteSystemStruct::ConnectMode connectionMode,
580 ::RakNet::RakNetSocket2* incomingRakNetSocket,
581 bool* thisIPConnectedRecently,
582 ::RakNet::SystemAddress bindingAddress,
583 int incomingMTU,
584 ::RakNet::RakNetGUID guid,
585 bool useSecurity
586 );
587
588 MCAPI void
589 CallPluginCallbacks(::DataStructures::List<::RakNet::PluginInterface2*>& pluginList, ::RakNet::Packet* packet);
590
591 MCAPI void ClearBufferedPackets();
592
593 MCAPI void ClearRequestedConnectionList();
594
595 MCAPI void CloseConnectionInternal(
596 ::RakNet::AddressOrGUID const& systemIdentifier,
597 bool sendDisconnectionNotification,
598 bool performImmediate,
599 uchar orderingChannel,
600 ::PacketPriority disconnectionNotificationPriority
601 );
602
603 MCAPI void DerefAllSockets();
604
605 MCAPI void DereferenceRemoteSystem(::RakNet::SystemAddress const& sa);
606
607 MCAPI void FillIPList();
608
609 MCAPI uint64 GetBestClockDifferential(::RakNet::SystemAddress systemAddress) const;
610
611 MCAPI int GetIndexFromSystemAddress(::RakNet::SystemAddress systemAddress, bool calledFromNetworkThread) const;
612
613 MCAPI ::RakNet::RakPeer::RemoteSystemStruct*
614 GetRemoteSystem(::RakNet::AddressOrGUID systemIdentifier, bool calledFromNetworkThread, bool onlyActive) const;
615
616 MCAPI ::RakNet::RakPeer::RemoteSystemStruct* GetRemoteSystemFromSystemAddress(
617 ::RakNet::SystemAddress systemAddress,
618 bool calledFromNetworkThread,
619 bool onlyActive
620 ) const;
621
622 MCAPI uint GetRemoteSystemIndex(::RakNet::SystemAddress const& sa) const;
623
624 MCAPI bool IsLoopbackAddress(::RakNet::AddressOrGUID const& systemIdentifier, bool matchPort) const;
625
626 MCAPI void NotifyAndFlagForShutdown(
627 ::RakNet::SystemAddress systemAddress,
628 bool performImmediate,
629 uchar orderingChannel,
630 ::PacketPriority disconnectionNotificationPriority
631 );
632
633 MCAPI void
634 OnConnectedPong(uint64 sendPingTime, uint64 sendPongTime, ::RakNet::RakPeer::RemoteSystemStruct* remoteSystem);
635
636 MCAPI void OnConnectionRequest(::RakNet::RakPeer::RemoteSystemStruct* remoteSystem, uint64 incomingTimestamp);
637
638 MCAPI void ParseConnectionRequestPacket(
639 ::RakNet::RakPeer::RemoteSystemStruct* remoteSystem,
640 ::RakNet::SystemAddress const& systemAddress,
641 char const* data,
642 int byteSize
643 );
644
645 MCAPI void PingInternal(::RakNet::SystemAddress target, bool performImmediate, ::PacketReliability reliability);
646
647 MCAPI RakPeer();
648
649 MCAPI void ReferenceRemoteSystem(::RakNet::SystemAddress const& sa, uint remoteSystemListIndex);
650
651 MCAPI void SendBuffered(
652 char const* data,
653 uint numberOfBitsToSend,
654 ::PacketPriority priority,
655 ::PacketReliability reliability,
656 char orderingChannel,
657 ::RakNet::AddressOrGUID systemIdentifier,
658 bool broadcast,
659 ::RakNet::RakPeer::RemoteSystemStruct::ConnectMode connectionMode,
660 uint receipt
661 );
662
663 MCAPI void SendBufferedList(
664 char const** data,
665 int const* lengths,
666 int numParameters,
667 ::PacketPriority priority,
668 ::PacketReliability reliability,
669 char orderingChannel,
670 ::RakNet::AddressOrGUID systemIdentifier,
671 bool broadcast,
672 ::RakNet::RakPeer::RemoteSystemStruct::ConnectMode connectionMode,
673 uint receipt
674 );
675
676 MCAPI ::RakNet::ConnectionAttemptResult SendConnectionRequest(
677 char const* host,
678 ushort remotePort,
679 char const* passwordData,
680 int passwordDataLength,
681 ::RakNet::PublicKey* publicKey,
682 uint connectionSocketIndex,
683 uint extraData,
684 uint sendConnectionAttemptCount,
685 uint timeBetweenSendConnectionAttemptsMS,
686 uint timeoutTime
687 );
688
689 MCAPI ::RakNet::ConnectionAttemptResult SendConnectionRequest(
690 char const* host,
691 ushort remotePort,
692 char const* passwordData,
693 int passwordDataLength,
694 ::RakNet::PublicKey* publicKey,
695 uint connectionSocketIndex,
696 uint extraData,
697 uint sendConnectionAttemptCount,
698 uint timeBetweenSendConnectionAttemptsMS,
699 uint timeoutTime,
700 ::RakNet::RakNetSocket2* socket
701 );
702
703 MCAPI bool SendImmediate(
704 char* data,
705 uint numberOfBitsToSend,
706 ::PacketPriority priority,
707 ::PacketReliability reliability,
708 char orderingChannel,
709 ::RakNet::AddressOrGUID systemIdentifier,
710 bool broadcast,
711 bool useCallerDataAllocation,
712 uint64 currentTime,
713 uint receipt
714 );
715 // NOLINTEND
716
717public:
718 // constructor thunks
719 // NOLINTBEGIN
720 MCAPI void* $ctor();
721 // NOLINTEND
722
723public:
724 // destructor thunk
725 // NOLINTBEGIN
726 MCAPI void $dtor();
727 // NOLINTEND
728
729public:
730 // virtual function thunks
731 // NOLINTBEGIN
732 MCAPI void $InitializeConfiguration(::std::unique_ptr<::RakNet::ShadowBanList> banList);
733
734 MCAPI ::RakNet::StartupResult $Startup(
735 uint maxConnections,
736 ::RakNet::SocketDescriptor* socketDescriptors,
737 uint socketDescriptorCount,
738 int threadPriority
739 );
740
741 MCFOLD bool $InitializeSecurity(char const* public_key, char const* private_key, bool bRequireClientKey);
742
743 MCFOLD void $DisableSecurity();
744
745 MCAPI void $AddToSecurityExceptionList(char const* ip);
746
747 MCAPI void $RemoveFromSecurityExceptionList(char const* ip);
748
749 MCAPI bool $IsInSecurityExceptionList(char const* ip);
750
751 MCAPI void $SetMaximumIncomingConnections(ushort numberAllowed);
752
753 MCFOLD uint $GetMaximumIncomingConnections() const;
754
755 MCAPI ushort $NumberOfConnections() const;
756
757 MCAPI void $SetIncomingPassword(char const* passwordData, int passwordDataLength);
758
759 MCAPI void $GetIncomingPassword(char* passwordData, int* passwordDataLength);
760
761 MCAPI ::RakNet::ConnectionAttemptResult $Connect(
762 char const* host,
763 ushort remotePort,
764 char const* passwordData,
765 int passwordDataLength,
766 ::RakNet::PublicKey* publicKey,
767 uint connectionSocketIndex,
768 uint sendConnectionAttemptCount,
769 uint timeBetweenSendConnectionAttemptsMS,
770 uint timeoutTime
771 );
772
773 MCAPI ::RakNet::ConnectionAttemptResult $ConnectWithSocket(
774 char const* host,
775 ushort remotePort,
776 char const* passwordData,
777 int passwordDataLength,
778 ::RakNet::RakNetSocket2* socket,
779 ::RakNet::PublicKey* publicKey,
780 uint sendConnectionAttemptCount,
781 uint timeBetweenSendConnectionAttemptsMS,
782 uint timeoutTime
783 );
784
785 MCAPI void $Shutdown(uint blockDuration, uchar orderingChannel, ::PacketPriority disconnectionNotificationPriority);
786
787 MCAPI bool $SetApplicationHandshakeCompleted(::RakNet::AddressOrGUID systemIdentifier);
788
789 MCAPI bool $IsActive() const;
790
791 MCAPI bool $GetConnectionList(::RakNet::SystemAddress* remoteSystems, ushort* numberOfSystems) const;
792
793 MCAPI uint $GetNextSendReceipt();
794
795 MCAPI uint $IncrementNextSendReceipt();
796
797 MCAPI uint $Send(
798 char const* data,
799 int const length,
800 ::PacketPriority priority,
801 ::PacketReliability reliability,
802 char orderingChannel,
803 ::RakNet::AddressOrGUID const systemIdentifier,
804 bool broadcast,
805 uint forceReceiptNumber
806 );
807
808 MCAPI uint $Send(
809 ::RakNet::BitStream const* bitStream,
810 ::PacketPriority priority,
811 ::PacketReliability reliability,
812 char orderingChannel,
813 ::RakNet::AddressOrGUID const systemIdentifier,
814 bool broadcast,
815 uint forceReceiptNumber
816 );
817
818 MCAPI void $SendLoopback(char const* data, int const length);
819
820 MCAPI uint $SendList(
821 char const** data,
822 int const* lengths,
823 int const numParameters,
824 ::PacketPriority priority,
825 ::PacketReliability reliability,
826 char orderingChannel,
827 ::RakNet::AddressOrGUID const systemIdentifier,
828 bool broadcast,
829 uint forceReceiptNumber
830 );
831
832 MCAPI ::RakNet::Packet* $Receive();
833
834 MCAPI void $DeallocatePacket(::RakNet::Packet* packet);
835
836 MCFOLD uint $GetMaximumNumberOfPeers() const;
837
838 MCAPI void $CloseConnection(
839 ::RakNet::AddressOrGUID const target,
840 bool sendDisconnectionNotification,
841 uchar orderingChannel,
842 ::PacketPriority disconnectionNotificationPriority
843 );
844
845 MCAPI void $CancelConnectionAttempt(::RakNet::SystemAddress const target);
846
847 MCAPI ::RakNet::ConnectionState $GetConnectionState(::RakNet::AddressOrGUID const systemIdentifier);
848
849 MCAPI int $GetIndexFromSystemAddress(::RakNet::SystemAddress const systemAddress) const;
850
851 MCAPI ::RakNet::SystemAddress $GetSystemAddressFromIndex(uint index);
852
853 MCAPI ::RakNet::RakNetGUID $GetGUIDFromIndex(uint index);
854
855 MCAPI void $GetSystemList(
856 ::DataStructures::List<::RakNet::SystemAddress>& addresses,
857 ::DataStructures::List<::RakNet::RakNetGUID>& guids
858 ) const;
859
860 MCAPI void $AddToBanList(char const* IP, uint milliseconds);
861
862 MCAPI void $RemoveFromBanList(char const* IP);
863
864 MCAPI void $ClearBanList();
865
866 MCAPI bool $IsBanned(char const* IP);
867
868 MCAPI void $SetLimitIPConnectionFrequency(bool b);
869
870 MCAPI void $Ping(::RakNet::SystemAddress const target);
871
872 MCAPI bool
873 $Ping(char const* host, ushort remotePort, bool onlyReplyOnAcceptingConnections, uint connectionSocketIndex);
874
875 MCAPI void $SendNatTraversalMessage(::RakNet::SystemAddress const target);
876
877 MCAPI int $GetAveragePing(::RakNet::AddressOrGUID const systemIdentifier);
878
879 MCAPI int $GetLastPing(::RakNet::AddressOrGUID const systemIdentifier) const;
880
881 MCAPI int $GetLowestPing(::RakNet::AddressOrGUID const systemIdentifier) const;
882
883 MCAPI void $SetOccasionalPing(bool doPing);
884
885 MCAPI uint64 $GetClockDifferential(::RakNet::AddressOrGUID const systemIdentifier);
886
887 MCAPI void $SetOfflinePingResponse(char const* data, uint const length);
888
889 MCAPI void $GetOfflinePingResponse(char** data, uint* length);
890
891 MCAPI ::RakNet::SystemAddress $GetInternalID(::RakNet::SystemAddress const systemAddress, int const index) const;
892
893 MCAPI void $SetInternalID(::RakNet::SystemAddress systemAddress, int index);
894
895 MCAPI ::RakNet::SystemAddress $GetExternalID(::RakNet::SystemAddress const target) const;
896
897 MCAPI ::RakNet::RakNetGUID const $GetMyGUID() const;
898
899 MCAPI void $resetMyGUID();
900
901 MCAPI ::RakNet::SystemAddress $GetMyBoundAddress(int const socketIndex);
902
903 MCAPI void $SetAllowUnconnectedPings(bool unconnectedPings);
904
905 MCAPI bool $GetAllowUnconnectedPings() const;
906
907 MCAPI ::RakNet::RakNetGUID const& $GetGuidFromSystemAddress(::RakNet::SystemAddress const input) const;
908
909 MCAPI ::RakNet::SystemAddress $GetSystemAddressFromGuid(::RakNet::RakNetGUID const input) const;
910
911 MCFOLD bool
912 $GetClientPublicKeyFromSystemAddress(::RakNet::SystemAddress const input, char* client_public_key) const;
913
914 MCAPI void $SetTimeoutTime(uint timeMS, ::RakNet::SystemAddress const target);
915
916 MCAPI uint $GetTimeoutTime(::RakNet::SystemAddress const target);
917
918 MCAPI int $GetMTUSize(::RakNet::SystemAddress const target) const;
919
920 MCAPI uint $GetNumberOfAdapters();
921
922 MCAPI ::RakNet::NetworkAdapter& $GetLocalAdapter(uint index);
923
924 MCAPI uint $GetNumberOfAddresses();
925
926 MCAPI char const* $GetLocalIP(uint index);
927
928 MCAPI bool $IsLocalIP(char const* ip);
929
930 MCAPI void $AllowConnectionResponseIPMigration(bool allow);
931
932 MCAPI bool
933 $AdvertiseSystem(char const* host, ushort remotePort, char const* data, int dataLength, uint connectionSocketIndex);
934
935 MCAPI void $SetSplitMessageProgressInterval(int interval);
936
937 MCAPI int $GetSplitMessageProgressInterval() const;
938
939 MCAPI void $SetUnreliableTimeout(uint timeoutMS);
940
941 MCAPI void $SendTTL(char const* host, ushort remotePort, int ttl, uint connectionSocketIndex);
942
943 MCAPI void $AttachPlugin(::RakNet::PluginInterface2* plugin);
944
945 MCAPI void $DetachPlugin(::RakNet::PluginInterface2* plugin);
946
947 MCAPI void $PushBackPacket(::RakNet::Packet* packet, bool pushAtHead);
948
949 MCAPI void $ChangeSystemAddress(::RakNet::RakNetGUID guid, ::RakNet::SystemAddress const& systemAddress);
950
951 MCAPI ::RakNet::Packet* $AllocatePacket(uint dataSize);
952
953 MCAPI ::RakNet::RakNetSocket2* $GetSocket(::RakNet::SystemAddress const target);
954
955 MCAPI void $GetSockets(::DataStructures::List<::RakNet::RakNetSocket2*>& sockets);
956
957 MCAPI void $ReleaseSockets(::DataStructures::List<::RakNet::RakNetSocket2*>& sockets);
958
959 MCAPI void $WriteOutOfBandHeader(::RakNet::BitStream* bitStream);
960
961 MCAPI void
962 $SetUserUpdateThread(void (*_userUpdateThreadPtr)(::RakNet::RakPeerInterface*, void*), void* _userUpdateThreadData);
963
964 MCAPI void $SetIncomingDatagramEventHandler(bool (*_incomingDatagramEventHandler)(::RakNet::RNS2RecvStruct*));
965
966 MCFOLD void $ApplyNetworkSimulator(float packetloss, ushort minExtraPing, ushort extraPingVariance);
967
968 MCAPI void $SetPerConnectionOutgoingBandwidthLimit(uint maxBitsPerSecond);
969
970 MCFOLD bool $IsNetworkSimulatorActive();
971
972 MCAPI ::RakNet::RakNetStatistics*
973 $GetStatistics(::RakNet::SystemAddress const systemAddress, ::RakNet::RakNetStatistics* rns);
974
975 MCAPI bool $GetStatistics(uint const index, ::RakNet::RakNetStatistics* rns);
976
977 MCAPI void $GetStatisticsList(
978 ::DataStructures::List<::RakNet::SystemAddress>& addresses,
979 ::DataStructures::List<::RakNet::RakNetGUID>& guids,
980 ::DataStructures::List<::RakNet::RakNetStatistics>& statistics
981 );
982
983 MCAPI uint $GetReceiveBufferSize();
984
985 MCAPI bool $RunUpdateCycle(::RakNet::BitStream& updateBitStream);
986
987 MCAPI bool
988 $SendOutOfBand(char const* host, ushort remotePort, char const* data, uint dataLength, uint connectionSocketIndex);
989
990 MCAPI void $DeallocRNS2RecvStruct(::RakNet::RNS2RecvStruct* s, char const* file, uint line);
991
992 MCAPI ::RakNet::RNS2RecvStruct* $AllocRNS2RecvStruct(char const* file, uint line);
993
994 MCAPI void $OnRNS2Recv(::RakNet::RNS2RecvStruct* recvStruct);
995
996
997 // NOLINTEND
998
999public:
1000 // vftables
1001 // NOLINTBEGIN
1002 MCNAPI static void** $vftableForRakPeerInterface();
1003
1004 MCNAPI static void** $vftableForRNS2EventHandler();
1005 // NOLINTEND
1006};
1007
1008} // namespace RakNet
Definition BitStream.h:7
Definition PluginInterface2.h:20
Definition RNS2EventHandler.h:12
Definition RakNetSocket2.h:12
Definition RakPeerInterface.h:32
static MCAPI void ** $vftableForRakPeerInterface()
static MCAPI void ** $vftableForRNS2EventHandler()
Definition RakString.h:10
Definition ShadowBanList.h:12
STL namespace.
Definition AddressOrGUID.h:11
Definition NetworkAdapter.h:7
Definition Packet.h:7
Definition PublicKey.h:7
Definition RNS2RecvStruct.h:7
Definition RakNetGUID.h:7
Definition RakNetStatistics.h:7
Definition RakPeer.h:62
Definition RakPeer.h:193
Definition RemoteSystemIndex.h:7
Definition SocketDescriptor.h:7
Definition SystemAddress.h:7