LeviLamina
Loading...
Searching...
No Matches
RakPeerHelper.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/raknet/StartupResult.h"
7
8// auto generated forward declare list
9// clang-format off
11namespace RakNet { class RakPeerInterface; }
12namespace RakNet { struct SocketDescriptor; }
13// clang-format on
14
15class RakPeerHelper {
16public:
17 // RakPeerHelper inner types declare
18 // clang-format off
20 // clang-format on
21
22 // RakPeerHelper inner types define
23 enum class IPVersion : int {
24 IPv4 = 0,
25 IPv6 = 1,
26 Count = 2,
27 };
28
29 enum class PeerPurpose : int {
30 Gameplay = 0,
31 LanDiscovery = 1,
32 Count = 2,
33 };
34
36 public:
37 // virtual functions
38 // NOLINTBEGIN
39 virtual ~IPSupportInterface() = default;
40
41 virtual bool useIPv4Only() const = 0;
42
43 virtual bool useIPv6Only() const = 0;
44
45 virtual ushort getDefaultGamePort() const = 0;
46
47 virtual ushort getDefaultGamePortv6() const = 0;
48 // NOLINTEND
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<4, 4, ::RakNet::StartupResult> mResult;
55 ::ll::TypedStorage<4, 8, int[2]> mConnectionIndices;
56 ::ll::TypedStorage<2, 4, ushort[2]> mBoundPorts;
57 ::ll::TypedStorage<8, 8, ::RakPeerHelper::IPSupportInterface&> mIPSupportInterface;
58 // NOLINTEND
59
60public:
61 // prevent constructor by default
62 RakPeerHelper& operator=(RakPeerHelper const&);
63 RakPeerHelper(RakPeerHelper const&);
64 RakPeerHelper();
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCAPI ::RakNet::StartupResult _startupInternal(
70 ::gsl::not_null<::RakNet::RakPeerInterface*> peer,
71 ::ConnectionDefinition const& definition,
73 int& socketCount,
74 int ipv6Index
75 );
76
77 MCAPI ::RakNet::StartupResult peerStartup(
79 ::ConnectionDefinition const& definition,
80 ::RakPeerHelper::PeerPurpose purpose
81 );
82 // NOLINTEND
83};
Definition RakPeerInterface.h:32
Definition RakPeerHelper.h:35
Definition ConnectionDefinition.h:5
Definition SocketDescriptor.h:7