LeviLamina
Loading...
Searching...
No Matches
NatTypeDetectionServer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/raknet/PI2_LostConnectionReason.h"
7#include "mc/deps/raknet/PluginInterface2.h"
8#include "mc/deps/raknet/PluginReceiveResult.h"
9#include "mc/deps/raknet/RNS2EventHandler.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace RakNet { struct Packet; }
14namespace RakNet { struct RNS2RecvStruct; }
15namespace RakNet { struct RakNetGUID; }
16namespace RakNet { struct SystemAddress; }
17// clang-format on
18
19namespace RakNet {
20
21class NatTypeDetectionServer : public ::RakNet::PluginInterface2, public ::RakNet::RNS2EventHandler {
22public:
23 // NatTypeDetectionServer inner types declare
24 // clang-format off
26 // clang-format on
27
28 // NatTypeDetectionServer inner types define
29 enum class NATDetectionState : int {
30 None = 0,
31 TestingNone1 = 1,
32 TestingNone2 = 2,
33 TestingFullCone1 = 3,
34 TestingFullCone2 = 4,
35 TestingAddressRestricted1 = 5,
36 TestingAddressRestricted2 = 6,
37 TestingPortRestricted1 = 7,
38 TestingPortRestricted2 = 8,
39 Done = 9,
40 };
41
42 struct NATDetectionAttempt {
43 public:
44 // member variables
45 // NOLINTBEGIN
52 // NOLINTEND
53
54 public:
55 // prevent constructor by default
56 NATDetectionAttempt& operator=(NATDetectionAttempt const&);
57 NATDetectionAttempt(NATDetectionAttempt const&);
58 NATDetectionAttempt();
59 };
60
61public:
62 // member variables
63 // NOLINTBEGIN
72 // NOLINTEND
73
74public:
75 // prevent constructor by default
76 NatTypeDetectionServer& operator=(NatTypeDetectionServer const&);
77 NatTypeDetectionServer(NatTypeDetectionServer const&);
78 NatTypeDetectionServer();
79
80public:
81 // virtual functions
82 // NOLINTBEGIN
83 virtual ~NatTypeDetectionServer() /*override*/ = default;
84
85 virtual void Update() /*override*/;
86
87 virtual ::RakNet::PluginReceiveResult OnReceive(::RakNet::Packet*) /*override*/;
88
89 virtual void OnClosedConnection(
92 ::RakNet::PI2_LostConnectionReason
93 ) /*override*/;
94
95 virtual void OnRNS2Recv(::RakNet::RNS2RecvStruct*) /*override*/;
96
97 virtual void DeallocRNS2RecvStruct(::RakNet::RNS2RecvStruct*, char const*, uint) /*override*/;
98
99 virtual ::RakNet::RNS2RecvStruct* AllocRNS2RecvStruct(char const*, uint) /*override*/;
100 // NOLINTEND
101
102public:
103 // virtual function thunks
104 // NOLINTBEGIN
105
106 // NOLINTEND
107};
108
109} // namespace RakNet
Definition PluginInterface2.h:20
Definition RNS2EventHandler.h:12
Definition NatTypeDetectionServer.h:42
Definition Packet.h:7
Definition RNS2RecvStruct.h:7
Definition RakNetGUID.h:7
Definition SystemAddress.h:7
Definition Alias.h:14