LeviLamina
Loading...
Searching...
No Matches
NetworkIdentifier.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/raknet/RakNetGUID.h"
5
6// auto generated inclusion list
7#include "mc/deps/nether_net/NetworkID.h"
8#include "mc/deps/raknet/RakNetGUID.h"
9
11public:
12 // NetworkIdentifier inner types define
13 enum class Type : int {
14 RakNet = 0,
15 Address = 1,
16 Address6 = 2,
17 NetherNet = 3,
18 Invalid = 4,
19 };
20
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::NetherNet::NetworkID mNetherNetId;
27 ::NetworkIdentifier::Type mType;
28 // NOLINTEND
29
30public:
31 LLNDAPI std::string getIPAndPort() const;
32
33 [[nodiscard]] bool operator==(::NetworkIdentifier const& other) const { return equalsTypeData(other); }
34
35public:
36 // member functions
37 // NOLINTBEGIN
38 MCAPI bool equalsTypeData(::NetworkIdentifier const& other) const;
39
40 MCAPI ::std::string getAddress() const;
41
42 MCAPI ::std::string getCorrelationId() const;
43
44 MCAPI uint64 getHash() const;
45
46 MCAPI ::std::string getNetherNetOrRakNetIDAsString() const;
47
48 MCAPI bool isUnassigned() const;
49
50 MCAPI ::std::string toString() const;
51 // NOLINTEND
52
53public:
54 // static functions
55 // NOLINTBEGIN
56 MCAPI static ::std::string calculateCorrelationId(::RakNet::RakNetGUID const& rakId);
57 // NOLINTEND
58
59public:
60 // static variables
61 // NOLINTBEGIN
62 MCAPI static ::NetworkIdentifier& INVALID_ID();
63 // NOLINTEND
64};
65
66namespace std {
67template <>
68struct hash<NetworkIdentifier> {
69 size_t operator()(NetworkIdentifier const& d) const noexcept { return d.getHash(); }
70};
71} // namespace std
Definition NetworkIdentifier.h:10
STL namespace.
Definition NetworkID.h:17
Definition RakNetGUID.h:7
Definition Alias.h:14