Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ServerCommunicationInterface.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
8struct NetworkAddress;
9namespace Json { class Value; }
10// clang-format on
11
12class ServerCommunicationInterface {
13public:
14 // member variables
15 // NOLINTBEGIN
18 // NOLINTEND
19
20public:
21 // prevent constructor by default
22 ServerCommunicationInterface& operator=(ServerCommunicationInterface const&);
23 ServerCommunicationInterface(ServerCommunicationInterface const&);
24 ServerCommunicationInterface();
25
26public:
27 // member functions
28 // NOLINTBEGIN
29#ifdef LL_PLAT_S
30 MCNAPI void communicate(::std::string const& method, ::Json::Value const& params);
31
32 MCNAPI void sendBandwidthMetric(
33 uint64 connectionTotalBytesReceived,
34 uint64 connectionTotalBytesSent,
35 uint64 playerDeltaBytesReceived,
36 uint64 playerDeltaBytesSent,
37 ::std::string const& xuid
38 );
39
40 MCNAPI void sendChunkLoadTelemtryData(::ChunkLoadTelemetryData const& data);
41
42 MCNAPI void sendServerStarted();
43
44 MCNAPI void sendServerTickTime(::std::chrono::nanoseconds timepoint);
45#endif
46 // NOLINTEND
47
48public:
49 // static functions
50 // NOLINTBEGIN
51#ifdef LL_PLAT_S
52 MCNAPI static ::std::unique_ptr<::ServerCommunicationInterface> create(::NetworkAddress const& address);
53#endif
54 // NOLINTEND
55};
Definition Value.h:16
Definition ChunkLoadTelemetryData.h:11
Definition NetworkAddress.h:5
Definition Alias.h:14