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 { struct NetworkID; }
21namespace NetherNet { struct SessionState; }
22namespace webrtc { class SessionDescriptionInterface; }
23// clang-format on
24
25namespace NetherNet {
26
28public:
29 // NetworkSessionManager inner types declare
30 // clang-format off
32 // clang-format on
33
34 // NetworkSessionManager inner types define
36 public:
37 // member variables
38 // NOLINTBEGIN
40 // NOLINTEND
41
42 public:
43 // prevent constructor by default
47 };
48
49public:
50 // member variables
51 // NOLINTBEGIN
57 // NOLINTEND
58
59public:
60 // prevent constructor by default
64
65public:
66 // virtual functions
67 // NOLINTBEGIN
68 // vIndex: 0
69 virtual ~NetworkSessionManager() /*override*/ = default;
70 // NOLINTEND
71
72public:
73 // member functions
74 // NOLINTBEGIN
75 MCNAPI void ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId);
76
79 ::std::tuple<
80 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
82 );
83
85 ::NetherNet::NetworkID networkIDRemote,
86 uint64 connectionId,
87 ::NetherNet::ESessionError reason
88 );
89
90 MCNAPI void FilterDeadSessions(
92 ::std::tuple<
93 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
95 );
96
97 MCNAPI ::NetherNet::NetworkSession* FindOrCreateSpecificSession(
99 uint64 connectionId,
101 );
102
103 MCNAPI ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>& GetCurrentSessions(
104 ::NetherNet::NetworkID remoteID,
106 );
107
108 MCNAPI bool
109 GetSessionState(::NetherNet::NetworkID peerId, uint64 connectionId, ::NetherNet::SessionState* pConnectionState);
110
111 MCNAPI ::NetherNet::ESessionError InitiateIncomingSession(
112 ::NetherNet::NetworkID remoteID,
113 uint64 const& connectionId,
114 ::std::unique_ptr<::webrtc::SessionDescriptionInterface> pSessionDescription,
115 ::NetherNet::SignalingChannelId preference,
117 );
118
119 MCNAPI ::NetherNet::NetworkSession* InitiateOutgoingSession(
120 ::NetherNet::NetworkID remoteID,
122 );
123
124 MCNAPI bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize);
125
126 MCNAPI void NotifyOnSessionOpen(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
127
128 MCNAPI bool NotifyOnSessionRequested(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
129
131
132 MCNAPI void ProcessError(::NetherNet::NetworkID remoteID, uint64 connectionId, ::NetherNet::ESessionError error);
133
134 MCNAPI void ProcessSignal(
135 ::NetherNet::NetworkID remoteID,
136 ::NetherNet::ConnectError const& signal,
137 ::NetherNet::SignalingChannelId
138 ) const;
139
140 MCNAPI void ProcessSignal(
141 ::NetherNet::NetworkID remoteID,
142 ::NetherNet::ConnectResponse const& signal,
143 ::NetherNet::SignalingChannelId
144 ) const;
145
146 MCNAPI void ProcessSignal(
147 ::NetherNet::NetworkID remoteID,
148 ::NetherNet::CandidateAdd const& signal,
149 ::NetherNet::SignalingChannelId
150 );
151
152 MCNAPI void ProcessSignal(
153 ::NetherNet::NetworkID remoteID,
154 ::NetherNet::ConnectRequest const& signal,
155 ::NetherNet::SignalingChannelId sourceChannel
156 );
157
158 MCNAPI bool
159 ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void* pubDest, uint cbDest, uint* pcbMessageSize);
160
161 MCNAPI void
162 RemoteMessageReceived(::NetherNet::NetworkID remoteID, uint64 connectionId, void const* pvData, uint64 cbSize);
163
164 MCNAPI bool SendPacket(
165 ::NetherNet::NetworkID networkIDRemote,
166 uint64 connectionId,
167 char const* pbData,
168 uint cbData,
169 ::NetherNet::ESendType eSendType
170 );
171
172 MCNAPI ::NetherNet::ErrorOr<void, ::NetherNet::ESessionError> SendToSignalingChannel(
173 ::NetherNet::NetworkID networkIDTo,
174 ::std::variant<
178 ::NetherNet::CandidateAdd> const& signal,
179 ::std::optional<::NetherNet::SignalingChannelId> preference
180 );
181 // NOLINTEND
182
183public:
184 // vftables
185 // NOLINTBEGIN
186 MCNAPI static void** $vftable();
187 // NOLINTEND
188};
189
190} // 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:27
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 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 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 NetworkSession.h:8
Definition NetworkID.h:17
Definition NetworkSessionManager.h:35
Definition SessionState.h:7
Definition Alias.h:14