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/ESendType.h"
8#include "mc/deps/nether_net/ESessionError.h"
9#include "mc/deps/nether_net/SignalingChannelId.h"
10#include "mc/deps/nether_net/utils/ErrorOr.h"
11#include "mc/platform/threading/UniqueLock.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace NetherNet { class CandidateAdd; }
16namespace NetherNet { class ConnectError; }
17namespace NetherNet { class ConnectRequest; }
18namespace NetherNet { class ConnectResponse; }
19namespace NetherNet { class NetworkSession; }
20namespace NetherNet { class SimpleNetworkInterfaceImpl; }
21namespace NetherNet { struct NetworkID; }
22namespace NetherNet { struct SessionState; }
23namespace webrtc { class SessionDescriptionInterface; }
24// clang-format on
25
26namespace NetherNet {
27
29public:
30 // NetworkSessionManager inner types declare
31 // clang-format off
33 // clang-format on
34
35 // NetworkSessionManager inner types define
37 public:
38 // member variables
39 // NOLINTBEGIN
41 // NOLINTEND
42
43 public:
44 // prevent constructor by default
48 };
49
50public:
51 // member variables
52 // NOLINTBEGIN
58 // NOLINTEND
59
60public:
61 // prevent constructor by default
65
66public:
67 // virtual functions
68 // NOLINTBEGIN
69 // vIndex: 0
70 virtual ~NetworkSessionManager() /*override*/ = default;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCNAPI void ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId);
77
80 ::std::tuple<
81 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
83 );
84
86 ::NetherNet::NetworkID networkIDRemote,
87 uint64 connectionId,
88 ::NetherNet::ESessionError reason
89 );
90
91 MCNAPI void FilterDeadSessions(
93 ::std::tuple<
94 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
96 );
97
98 MCNAPI ::NetherNet::NetworkSession* FindOrCreateSpecificSession(
100 uint64 connectionId,
102 );
103
104 MCNAPI ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>& GetCurrentSessions(
105 ::NetherNet::NetworkID remoteID,
107 );
108
109 MCNAPI bool
110 GetSessionState(::NetherNet::NetworkID peerId, uint64 connectionId, ::NetherNet::SessionState* pConnectionState);
111
112 MCNAPI ::NetherNet::ESessionError InitiateIncomingSession(
113 ::NetherNet::NetworkID remoteID,
114 uint64 const& connectionId,
115 ::std::unique_ptr<::webrtc::SessionDescriptionInterface> pSessionDescription,
116 ::NetherNet::SignalingChannelId preference,
118 );
119
120 MCNAPI ::NetherNet::NetworkSession* InitiateOutgoingSession(
121 ::NetherNet::NetworkID remoteID,
123 );
124
125 MCNAPI bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize);
126
130 );
131
132 MCNAPI void NotifyOnSessionOpen(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
133
134 MCNAPI bool NotifyOnSessionRequested(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
135
137
138 MCNAPI void ProcessError(::NetherNet::NetworkID remoteID, uint64 connectionId, ::NetherNet::ESessionError error);
139
140 MCNAPI void ProcessSignal(
141 ::NetherNet::NetworkID remoteID,
142 ::NetherNet::ConnectError const& signal,
143 ::NetherNet::SignalingChannelId
144 ) const;
145
146 MCNAPI void ProcessSignal(
147 ::NetherNet::NetworkID remoteID,
148 ::NetherNet::ConnectResponse const& signal,
149 ::NetherNet::SignalingChannelId
150 ) const;
151
152 MCNAPI void ProcessSignal(
153 ::NetherNet::NetworkID remoteID,
154 ::NetherNet::CandidateAdd const& signal,
155 ::NetherNet::SignalingChannelId
156 );
157
158 MCNAPI void ProcessSignal(
159 ::NetherNet::NetworkID remoteID,
160 ::NetherNet::ConnectRequest const& signal,
161 ::NetherNet::SignalingChannelId sourceChannel
162 );
163
164 MCNAPI bool
165 ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void* pubDest, uint cbDest, uint* pcbMessageSize);
166
167 MCNAPI void
168 RemoteMessageReceived(::NetherNet::NetworkID remoteID, uint64 connectionId, void const* pvData, uint64 cbSize);
169
170 MCNAPI bool SendPacket(
171 ::NetherNet::NetworkID networkIDRemote,
172 uint64 connectionId,
173 char const* pbData,
174 uint cbData,
175 ::NetherNet::ESendType eSendType
176 );
177
178 MCNAPI ::NetherNet::ErrorOr<void, ::NetherNet::ESessionError> SendToSignalingChannel(
179 ::NetherNet::NetworkID networkIDTo,
180 ::std::variant<
184 ::NetherNet::CandidateAdd> const& signal,
185 ::std::optional<::NetherNet::SignalingChannelId> preference
186 );
187 // NOLINTEND
188
189public:
190 // constructor thunks
191 // NOLINTBEGIN
193 // NOLINTEND
194
195public:
196 // vftables
197 // NOLINTBEGIN
198 MCNAPI static void** $vftable();
199 // NOLINTEND
200};
201
202} // 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:28
MCAPI bool ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void *pubDest, uint cbDest, uint *pcbMessageSize)
static MCAPI void ** $vftable()
MCAPI ::NetherNet::ErrorOr< void, ::NetherNet::ESessionError > SendToSignalingChannel(::NetherNet::NetworkID networkIDTo, ::std::variant< ::NetherNet::ConnectRequest, ::NetherNet::ConnectResponse, ::NetherNet::ConnectError, ::NetherNet::CandidateAdd > const &signal, ::std::optional<::NetherNet::SignalingChannelId > preference)
MCAPI bool SendPacket(::NetherNet::NetworkID networkIDRemote, uint64 connectionId, char const *pbData, uint cbData, ::NetherNet::ESendType eSendType)
MCAPI void ProcessSignal(::NetherNet::NetworkID remoteID, ::NetherNet::ConnectResponse const &signal, ::NetherNet::SignalingChannelId) const
MCAPI void ProcessSignal(::NetherNet::NetworkID remoteID, ::NetherNet::CandidateAdd const &signal, ::NetherNet::SignalingChannelId)
MCAPI::NetherNet::NetworkSession * InitiateOutgoingSession(::NetherNet::NetworkID remoteID, ::Bedrock::Threading::UniqueLock<::std::recursive_mutex > const &sessionsLock)
MCAPI void RemoteMessageReceived(::NetherNet::NetworkID remoteID, uint64 connectionId, void const *pvData, uint64 cbSize)
MCAPI void NotifyOnSessionOpen(::NetherNet::NetworkID networkIDRemote, uint64 connectionId)
MCAPI NetworkSessionManager(::NetherNet::ContextProxy const &ctx, ::NetherNet::SimpleNetworkInterfaceImpl &networkInterface)
MCAPI void ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId)
MCAPI void ProcessSignal(::NetherNet::NetworkID remoteID, ::NetherNet::ConnectRequest const &signal, ::NetherNet::SignalingChannelId sourceChannel)
MCAPI void FilterDeadSessions(::NetherNet::NetworkID remoteID, ::std::tuple< ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession > > &, ::Bedrock::Threading::UniqueLock<::std::recursive_mutex > const & > const &list)
MCAPI ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession > > & GetCurrentSessions(::NetherNet::NetworkID remoteID, ::Bedrock::Threading::UniqueLock<::std::recursive_mutex > const &sessionsLock)
MCAPI bool GetSessionState(::NetherNet::NetworkID peerId, uint64 connectionId, ::NetherNet::SessionState *pConnectionState)
MCAPI::NetherNet::ESessionError InitiateIncomingSession(::NetherNet::NetworkID remoteID, uint64 const &connectionId, ::std::unique_ptr<::webrtc::SessionDescriptionInterface > pSessionDescription, ::NetherNet::SignalingChannelId preference, ::Bedrock::Threading::UniqueLock<::std::recursive_mutex > const &sessionsLock)
MCAPI::NetherNet::NetworkSession * FindOrCreateSpecificSession(::NetherNet::NetworkID remoteId, uint64 connectionId, ::Bedrock::Threading::UniqueLock<::std::recursive_mutex > const &sessionsLock)
MCAPI bool CloseSessionWithReason(::NetherNet::NetworkID networkIDRemote, uint64 connectionId, ::NetherNet::ESessionError reason)
MCAPI void PeriodicDeadSessionCleanupOnSignalThread()
MCAPI void * $ctor(::NetherNet::ContextProxy const &ctx, ::NetherNet::SimpleNetworkInterfaceImpl &networkInterface)
MCAPI bool NotifyOnSessionRequested(::NetherNet::NetworkID networkIDRemote, uint64 connectionId)
MCAPI void ProcessError(::NetherNet::NetworkID remoteID, uint64 connectionId, ::NetherNet::ESessionError error)
MCAPI bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint *pcbMessageSize)
MCAPI void CloseInactiveSessionsOnSignalThread(::NetherNet::NetworkID remoteID, ::std::tuple< ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession > > &, ::Bedrock::Threading::UniqueLock<::std::recursive_mutex > const & > const &list)
MCAPI void ProcessSignal(::NetherNet::NetworkID remoteID, ::NetherNet::ConnectError const &signal, ::NetherNet::SignalingChannelId) const
Definition SimpleNetworkInterfaceImpl.h:40
Definition NetworkSession.h:8
Definition NetworkID.h:12
Definition NetworkSessionManager.h:36
Definition SessionState.h:7
Definition ctx.h:5
Definition Alias.h:14