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