LeviLamina
Loading...
Searching...
No Matches
NetherNet.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/utils/ErrorOr.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace NetherNet { class AesContext; }
11namespace NetherNet { class CandidateAdd; }
12namespace NetherNet { class ConnectError; }
13namespace NetherNet { class ConnectRequest; }
14namespace NetherNet { class ConnectResponse; }
15namespace NetherNet { struct GlobalConfiguration; }
16namespace NetherNet { struct NetworkID; }
17namespace rtc { class IPAddress; }
18// clang-format on
19
20namespace NetherNet {
21// functions
22// NOLINTBEGIN
23MCNAPI ::NetherNet::ErrorOr<::std::unique_ptr<::NetherNet::AesContext>, ::std::error_code> CreateEnvelope(uint64 id);
24
25MCNAPI uint64 CreateID();
26
27MCNAPI ::NetherNet::ErrorOr<::std::vector<uchar>, ::std::error_code> CreateKey(uint64 id);
28
29MCNAPI void InitializeNetherNetTransport(::NetherNet::GlobalConfiguration const& config);
30
31MCNAPI ::std::optional<::std::variant<
32 ::NetherNet::ConnectRequest,
33 ::NetherNet::ConnectResponse,
34 ::NetherNet::ConnectError,
35 ::NetherNet::CandidateAdd>>
36TryParseSignalingMessage(::std::string_view message);
37
38MCNAPI ::std::vector<::std::byte> makeDiscoveryMessagePacket(
39 ::NetherNet::NetworkID senderId,
40 ::NetherNet::NetworkID recipientId,
41 ::std::vector<::std::byte> data
42);
43
44MCNAPI ::std::vector<::std::byte>
45makeDiscoveryResponsePacket(::NetherNet::NetworkID senderId, ::std::vector<::std::byte> data);
46// NOLINTEND
47
48// static variables
49// NOLINTBEGIN
50MCNAPI ::rtc::IPAddress const& IPv4Any();
51
52MCNAPI ::rtc::IPAddress const& IPv4Broadcast();
53
54MCNAPI ::rtc::IPAddress const& IPv6AllHostsLinkLocal();
55
56MCNAPI ::rtc::IPAddress const& IPv6Any();
57// NOLINTEND
58
59} // namespace NetherNet
Definition AesContext.h:15
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:12
Definition ConnectResponse.h:12
Definition IPAddress.h:7
Definition GlobalConfiguration.h:7
Definition NetworkID.h:17