LeviLamina
Loading...
Searching...
No Matches
RakNetServerLocator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/network/LocatorStateChangeRequest.h"
8#include "mc/network/PermissionIPv6.h"
9#include "mc/network/PermissionLAN.h"
10#include "mc/network/RakNetServerLANVisibility.h"
11#include "mc/network/RakPeerHelper.h"
12#include "mc/network/ServerConnectivityTestResult.h"
13#include "mc/network/ServerLocator.h"
14#include "mc/platform/threading/LockGuard.h"
15#include "mc/world/level/GameType.h"
16
17// auto generated forward declare list
18// clang-format off
19class AppPlatform;
21class RakNetConnector;
23struct PortPair;
24namespace RakNet { class RakPeerInterface; }
25namespace RakNet { struct Packet; }
26namespace RakNet { struct RakNetGUID; }
27// clang-format on
28
30public:
31 // RakNetServerLocator inner types declare
32 // clang-format off
33 struct AnnounceServerData;
35 class PingRateRecorder;
37 struct SuspendStateData;
38 // clang-format on
39
40 // RakNetServerLocator inner types define
41 enum class protocolVersion : int {
42 Ipv4 = 4,
43 Ipv6 = 6,
44 };
45
47 public:
48 // member variables
49 // NOLINTBEGIN
59 // NOLINTEND
60
61 public:
62 // prevent constructor by default
63 PingRateRecorder& operator=(PingRateRecorder const&);
66 };
67
69 public:
70 // member variables
71 // NOLINTBEGIN
73 // NOLINTEND
74
75 public:
76 // prevent constructor by default
80 };
81
83 public:
84 // member variables
85 // NOLINTBEGIN
94 // NOLINTEND
95
96 public:
97 // prevent constructor by default
98 AnnounceServerData& operator=(AnnounceServerData const&);
100
101 public:
102 // member functions
103 // NOLINTBEGIN
105
107 // NOLINTEND
108
109 public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCNAPI void* $ctor(::RakNetServerLocator::AnnounceServerData const& announceData);
113 // NOLINTEND
114
115 public:
116 // destructor thunk
117 // NOLINTBEGIN
118 MCNAPI void $dtor();
119 // NOLINTEND
120 };
121
123 public:
124 // member variables
125 // NOLINTBEGIN
129 // NOLINTEND
130
131 public:
132 // prevent constructor by default
136
137 public:
138 // member functions
139 // NOLINTBEGIN
141 // NOLINTEND
142
143 public:
144 // destructor thunk
145 // NOLINTBEGIN
146 MCNAPI void $dtor();
147 // NOLINTEND
148 };
149
151 public:
152 // member variables
153 // NOLINTBEGIN
157 // NOLINTEND
158
159 public:
160 // prevent constructor by default
161 SuspendStateData& operator=(SuspendStateData const&);
164
165 public:
166 // member functions
167 // NOLINTBEGIN
169 // NOLINTEND
170
171 public:
172 // destructor thunk
173 // NOLINTBEGIN
174 MCNAPI void $dtor();
175 // NOLINTEND
176 };
177
178public:
179 // member variables
180 // NOLINTBEGIN
208 // NOLINTEND
209
210public:
211 // prevent constructor by default
212 RakNetServerLocator& operator=(RakNetServerLocator const&);
215
216public:
217 // virtual functions
218 // NOLINTBEGIN
219 // vIndex: 0
220 virtual ~RakNetServerLocator() /*override*/;
221
222 // vIndex: 3
223 virtual void startAnnouncingServer(
224 ::std::string const& playerName,
225 ::std::string const& worldName,
227 ::GameType gameType,
228 int numPlayers,
229 int maxNumPlayers,
230 bool isJoinableThroughServerScreen,
231 bool isEditorWorld,
232 bool isHardcore
233 ) /*override*/;
234
235 // vIndex: 4
236 virtual void stopAnnouncingServer(::Bedrock::NonOwnerPointer<::AppPlatform> appPlatform) /*override*/;
237
238 // vIndex: 5
239 virtual void startServerDiscovery(::PortPair ports) /*override*/;
240
241 // vIndex: 6
242 virtual void stopServerDiscovery() /*override*/;
243
244 // vIndex: 8
245 virtual void addCustomServer(::AsynchronousIPResolver const& futureIP, int port) /*override*/;
246
247 // vIndex: 7
248 virtual void addCustomServer(::std::string const& address, int port) /*override*/;
249
250 // vIndex: 9
251 virtual ::std::vector<::PingedCompatibleServer> getServerList() const /*override*/;
252
253 // vIndex: 10
254 virtual void clearServerList() /*override*/;
255
256 // vIndex: 11
257 virtual void update() /*override*/;
258
259 // vIndex: 12
260 virtual float getPingTimeForGUID(::std::string const& guid) /*override*/;
261
262 // vIndex: 13
263 virtual void checkCanConnectToCustomServerAsync(
264 ::std::string hostIpAddress,
265 int port,
266 ::std::function<void(::ServerConnectivityTestResult)> callback
267 ) /*override*/;
268
269 // vIndex: 1
270 virtual void _onDisable() /*override*/;
271
272 // vIndex: 2
273 virtual void _onEnable() /*override*/;
274 // NOLINTEND
275
276public:
277 // member functions
278 // NOLINTBEGIN
280 ::RakNetConnector& rakNetConnector,
281 ::RakPeerHelper::IPSupportInterface& ipInterface,
282 ::std::vector<::std::string> overrideBroadcastAddresses,
283 bool isServer,
284 ::RakNetServerLANVisibility serverLanVisibility,
285 ::PermissionLAN permissionLAN,
286 ::PermissionIPv6 permissionIPv6,
287 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
288 ::std::function<::std::unique_ptr<::RakNet::RakPeerInterface, void (*)(::RakNet::RakPeerInterface*)>()>
289 createUniqueRakPeerFunc
290 );
291
292 MCNAPI void _activate();
293
294 MCNAPI void _addCustomServerFromIpResolver(::AsynchronousIPResolver const& futureIP, int port);
295
296 MCNAPI bool _addCustomServerV4(::AsynchronousIPResolver const& futureIP, int port);
297
298 MCNAPI bool _addCustomServerV6(::AsynchronousIPResolver const& futureIP, int port);
299
301 ::LocatorStateChangeRequest newState,
302 ::RakNetServerLocator::AnnounceServerData newAnnounceData,
303 ::PortPair newPorts
304 );
305
306 MCNAPI ::std::string _getHostGuid(::std::string const& address, int port);
307
308 MCNAPI void _getServerOriginalAddress(::std::string& originalAddressToSet, ::std::string const& ip);
309
311 ::std::string const& data,
312 ::RakNet::Packet const* p,
313 bool insertAtBeginning,
314 uint64 readTime
315 );
316
318
319 MCNAPI void _onPingSend(::std::string const& guid, ::std::string const& addr, int ipVersion);
320
321 MCNAPI bool
322 _onPongReceive(float& latencyToSet, ::RakNet::RakNetGUID const& guid, uint const& receivedTime, int ipVersion);
323
325
327
328 MCNAPI void _startServerDiscovery(::PortPair const& ports);
329
331
332 MCNAPI void _stopServerDiscovery();
333
334 MCNAPI void _updateNetwork();
335
336 MCNAPI bool _updateQueuedPings();
337
338 MCNAPI void _updateState();
339 // NOLINTEND
340
341public:
342 // static functions
343 // NOLINTBEGIN
344 MCNAPI static bool
345 parseUnconnectedPongPacketData(::std::string const& data, ::std::vector<::std::string>& extraData);
346 // NOLINTEND
347
348public:
349 // constructor thunks
350 // NOLINTBEGIN
351 MCNAPI void* $ctor(
352 ::RakNetConnector& rakNetConnector,
353 ::RakPeerHelper::IPSupportInterface& ipInterface,
354 ::std::vector<::std::string> overrideBroadcastAddresses,
355 bool isServer,
356 ::RakNetServerLANVisibility serverLanVisibility,
357 ::PermissionLAN permissionLAN,
358 ::PermissionIPv6 permissionIPv6,
359 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
360 ::std::function<::std::unique_ptr<::RakNet::RakPeerInterface, void (*)(::RakNet::RakPeerInterface*)>()>
361 createUniqueRakPeerFunc
362 );
363 // NOLINTEND
364
365public:
366 // destructor thunk
367 // NOLINTBEGIN
368 MCNAPI void $dtor();
369 // NOLINTEND
370
371public:
372 // virtual function thunks
373 // NOLINTBEGIN
375 ::std::string const& playerName,
376 ::std::string const& worldName,
377 ::Bedrock::NonOwnerPointer<::AppPlatform> appPlatform,
378 ::GameType gameType,
379 int numPlayers,
380 int maxNumPlayers,
381 bool isJoinableThroughServerScreen,
382 bool isEditorWorld,
383 bool isHardcore
384 );
385
386 MCNAPI void $stopAnnouncingServer(::Bedrock::NonOwnerPointer<::AppPlatform> appPlatform);
387
388 MCNAPI void $startServerDiscovery(::PortPair ports);
389
390 MCNAPI void $stopServerDiscovery();
391
392 MCNAPI void $addCustomServer(::AsynchronousIPResolver const& futureIP, int port);
393
394 MCNAPI void $addCustomServer(::std::string const& address, int port);
395
396 MCNAPI ::std::vector<::PingedCompatibleServer> $getServerList() const;
397
398 MCNAPI void $clearServerList();
399
400 MCNAPI void $update();
401
402 MCNAPI float $getPingTimeForGUID(::std::string const& guid);
403
405 ::std::string hostIpAddress,
406 int port,
407 ::std::function<void(::ServerConnectivityTestResult)> callback
408 );
409
410 MCNAPI void $_onDisable();
411
412 MCNAPI void $_onEnable();
413 // NOLINTEND
414
415public:
416 // vftables
417 // NOLINTBEGIN
418 MCNAPI static void** $vftable();
419 // NOLINTEND
420};
Definition AppPlatform.h:50
Definition AsynchronousIPResolver.h:5
Definition NonOwnerPointer.h:9
Definition Packet.h:43
Definition RakNetConnector.h:29
Definition RakNetServerLocator.h:68
Definition RakNetServerLocator.h:46
Definition RakNetServerLocator.h:29
MCAPI void _onPingSend(::std::string const &guid, ::std::string const &addr, int ipVersion)
MCAPI void $clearServerList()
MCAPI bool _onPongReceive(float &latencyToSet, ::RakNet::RakNetGUID const &guid, uint const &receivedTime, int ipVersion)
MCAPI void _addCustomServerFromIpResolver(::AsynchronousIPResolver const &futureIP, int port)
MCAPI void _startServerDiscovery(::PortPair const &ports)
MCAPI void _setPingResponder(::RakNetServerLocator::AnnounceServerData const &serverData)
MCAPI void _stopAnnouncingServer()
MCAPI ::std::vector<::PingedCompatibleServer > $getServerList() const
MCAPI bool _handleUnconnectedPong(::std::string const &data, ::RakNet::Packet const *p, bool insertAtBeginning, uint64 readTime)
MCAPI void _updateState()
MCAPI float $getPingTimeForGUID(::std::string const &guid)
MCAPI void $stopAnnouncingServer(::Bedrock::NonOwnerPointer<::AppPlatform > appPlatform)
MCAPI void * $ctor(::RakNetConnector &rakNetConnector, ::RakPeerHelper::IPSupportInterface &ipInterface, ::std::vector<::std::string > overrideBroadcastAddresses, bool isServer, ::RakNetServerLANVisibility serverLanVisibility, ::PermissionLAN permissionLAN, ::PermissionIPv6 permissionIPv6, ::Bedrock::NonOwnerPointer<::AppPlatform > const &appPlatform, ::std::function<::std::unique_ptr<::RakNet::RakPeerInterface, void(*)(::RakNet::RakPeerInterface *)>()> createUniqueRakPeerFunc)
static MCAPI void ** $vftable()
MCAPI void $dtor()
MCAPI void _enqueueStateChangeRequest(::LocatorStateChangeRequest newState, ::RakNetServerLocator::AnnounceServerData newAnnounceData, ::PortPair newPorts)
MCAPI void $startServerDiscovery(::PortPair ports)
MCAPI::std::string _getHostGuid(::std::string const &address, int port)
MCAPI void $addCustomServer(::AsynchronousIPResolver const &futureIP, int port)
MCAPI void $startAnnouncingServer(::std::string const &playerName, ::std::string const &worldName, ::Bedrock::NonOwnerPointer<::AppPlatform > appPlatform, ::GameType gameType, int numPlayers, int maxNumPlayers, bool isJoinableThroughServerScreen, bool isEditorWorld, bool isHardcore)
MCAPI bool _addCustomServerV6(::AsynchronousIPResolver const &futureIP, int port)
MCAPI void _getServerOriginalAddress(::std::string &originalAddressToSet, ::std::string const &ip)
MCAPI void _startAnnouncingServer(::RakNetServerLocator::AnnounceServerData const &announceData)
MCAPI void $update()
MCAPI bool _updateQueuedPings()
MCAPI void _updateNetwork()
MCAPI void $stopServerDiscovery()
MCAPI void $_onEnable()
MCAPI bool _addCustomServerV4(::AsynchronousIPResolver const &futureIP, int port)
static MCAPI bool parseUnconnectedPongPacketData(::std::string const &data, ::std::vector<::std::string > &extraData)
MCAPI void _initializeBroadcastAddresses()
MCAPI void _stopServerDiscovery()
MCAPI void $checkCanConnectToCustomServerAsync(::std::string hostIpAddress, int port, ::std::function< void(::ServerConnectivityTestResult)> callback)
MCAPI void $_onDisable()
MCAPI void _activate()
Definition RakPeerHelper.h:15
Definition ServerLocator.h:19
STL namespace.
Definition PingedCompatibleServer.h:5
Definition PortPair.h:5
Definition RakNetServerLocator.h:82
MCAPI void * $ctor(::RakNetServerLocator::AnnounceServerData const &announceData)
MCAPI AnnounceServerData(::RakNetServerLocator::AnnounceServerData const &announceData)
Definition RakNetServerLocator.h:122
Definition RakNetServerLocator.h:150
Definition Alias.h:14