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