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 bool isUnassigned() const;
47
48 MCAPI ::std::string toString() const;
49 // NOLINTEND
50
51public:
52 // static functions
53 // NOLINTBEGIN
54 MCAPI static ::std::string calculateCorrelationId(::RakNet::RakNetGUID const& rakId);
55 // NOLINTEND
56
57public:
58 // static variables
59 // NOLINTBEGIN
60 MCAPI static ::NetworkIdentifier& INVALID_ID();
61 // NOLINTEND
62};
63
64namespace std {
65template <>
66struct hash<NetworkIdentifier> {
67 size_t operator()(NetworkIdentifier const& d) const noexcept { return d.getHash(); }
68};
69} // namespace std
Definition NetworkIdentifier.h:10
STL namespace.
Definition NetworkID.h:12
Definition RakNetGUID.h:7
Definition Alias.h:14