LeviLamina
Loading...
Searching...
No Matches
NetworkSessionManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/ContextProxy.h"
7#include "mc/deps/nether_net/ESessionError.h"
8#include "mc/deps/nether_net/SignalingChannelId.h"
9#include "mc/deps/nether_net/utils/ErrorOr.h"
10#include "mc/platform/threading/UniqueLock.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace NetherNet { class CandidateAdd; }
15namespace NetherNet { class ConnectError; }
16namespace NetherNet { class ConnectRequest; }
17namespace NetherNet { class ConnectResponse; }
18namespace NetherNet { class NetworkSession; }
19namespace NetherNet { struct NetworkID; }
20namespace NetherNet { struct SessionState; }
21// clang-format on
22
23namespace NetherNet {
24
26public:
27 // NetworkSessionManager inner types declare
28 // clang-format off
30 // clang-format on
31
32 // NetworkSessionManager inner types define
34 public:
35 // member variables
36 // NOLINTBEGIN
38 // NOLINTEND
39
40 public:
41 // prevent constructor by default
45 };
46
47public:
48 // member variables
49 // NOLINTBEGIN
55 // NOLINTEND
56
57public:
58 // prevent constructor by default
62
63public:
64 // virtual functions
65 // NOLINTBEGIN
66 // vIndex: 0
67 virtual ~NetworkSessionManager() /*override*/ = default;
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73 MCAPI void ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId);
74
75 MCAPI void CloseInactiveSessionsOnSignalThread(
77 ::std::tuple<
78 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
80 );
81
82 MCAPI bool CloseSessionWithReason(
83 ::NetherNet::NetworkID networkIDRemote,
84 uint64 connectionId,
85 ::NetherNet::ESessionError reason
86 );
87
88 MCAPI void FilterDeadSessions(
90 ::std::tuple<
91 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
93 );
94
95 MCAPI ::NetherNet::NetworkSession* FindOrCreateSpecificSession(
97 uint64 connectionId,
99 );
100
101 MCAPI ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>& GetCurrentSessions(
102 ::NetherNet::NetworkID remoteID,
104 );
105
106 MCAPI bool
107 GetSessionState(::NetherNet::NetworkID peerId, uint64 connectionId, ::NetherNet::SessionState* pConnectionState);
108
109 MCAPI ::NetherNet::NetworkSession* InitiateOutgoingSession(
110 ::NetherNet::NetworkID remoteID,
112 );
113
114 MCAPI bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize);
115
116 MCAPI void PeriodicDeadSessionCleanupOnSignalThread();
117
118 MCAPI void ProcessSignal(
119 ::NetherNet::NetworkID remoteID,
120 ::NetherNet::ConnectError const& signal,
121 ::NetherNet::SignalingChannelId
122 ) const;
123
124 MCAPI void ProcessSignal(
125 ::NetherNet::NetworkID remoteID,
126 ::NetherNet::ConnectRequest const& signal,
127 ::NetherNet::SignalingChannelId sourceChannel
128 );
129
130 MCAPI bool
131 ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void* pubDest, uint cbDest, uint* pcbMessageSize);
132
133 MCAPI void
134 RemoteMessageReceived(::NetherNet::NetworkID remoteID, uint64 connectionId, void const* pvData, uint64 cbSize);
135
136 MCAPI ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>
137 RemoveSession(::NetherNet::NetworkID remoteID, uint64 connectionId);
138
139 MCAPI ::NetherNet::ErrorOr<void, ::NetherNet::ESessionError> SendToSignalingChannel(
140 ::NetherNet::NetworkID networkIDTo,
141 ::std::variant<
145 ::NetherNet::CandidateAdd> const& signal,
146 ::std::optional<::NetherNet::SignalingChannelId> preference
147 );
148 // NOLINTEND
149
150public:
151 // destructor thunk
152 // NOLINTBEGIN
153
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
159 MCAPI static void** $vftable();
160 // NOLINTEND
161};
162
163} // namespace NetherNet
Definition UniqueLock.h:8
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:7
Definition ConnectResponse.h:7
Definition ContextProxy.h:18
Definition NetworkSessionManager.h:25
Definition NetworkSession.h:8
Definition NetworkID.h:7
Definition NetworkSessionManager.h:33
Definition SessionState.h:7
Definition Alias.h:14