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 forward declare list
7// clang-format off
8namespace RakNet { struct RakNetGUID; }
9// clang-format on
10
12public:
13 // NetworkIdentifier inner types define
14 enum class Type : int {
15 RakNet = 0,
16 Address = 1,
17 Address6 = 2,
18 NetherNet = 3,
19 Invalid = 4,
20 };
21
22public:
23 LLNDAPI std::string getIPAndPort() const;
24
25public:
26 // member variables
27 // NOLINTBEGIN
28 uint64 mNetherNetIdValue;
31 ::NetworkIdentifier::Type mType;
32 // NOLINTEND
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI ::std::string getAddress() const;
38
39 MCAPI ::std::string getCorrelationId() const;
40
41 MCAPI uint64 getHash() const;
42
43 MCAPI bool isUnassigned() const;
44
45 MCAPI bool operator==(::NetworkIdentifier const& other) const;
46
47 MCAPI ::std::string toString() const;
48 // NOLINTEND
49
50public:
51 // static functions
52 // NOLINTBEGIN
53 MCAPI static ::std::string calculateCorrelationId(uint64 netherNetId);
54
55 MCAPI static ::std::string calculateCorrelationId(::RakNet::RakNetGUID const& rakId);
56 // NOLINTEND
57
58public:
59 // static variables
60 // NOLINTBEGIN
61 MCAPI static ::NetworkIdentifier& INVALID_ID();
62 // NOLINTEND
63};
64
65namespace std {
66template <>
67struct hash<NetworkIdentifier> {
68 size_t operator()(NetworkIdentifier const& d) const noexcept { return d.getHash(); }
69};
70} // namespace std
Definition NetworkIdentifier.h:11
STL namespace.
Definition RakNetGUID.h:7
Definition Alias.h:14