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
77 ::std::tuple<
78 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
80 );
81
83 ::NetherNet::NetworkID networkIDRemote,
84 uint64 connectionId,
85 ::NetherNet::ESessionError reason
86 );
87
88 MCNAPI void FilterDeadSessions(
90 ::std::tuple<
91 ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>&,
93 );
94
95 MCNAPI ::NetherNet::NetworkSession* FindOrCreateSpecificSession(
97 uint64 connectionId,
99 );
100
101 MCNAPI ::std::vector<::std::unique_ptr<::NetherNet::NetworkSession>>& GetCurrentSessions(
102 ::NetherNet::NetworkID remoteID,
104 );
105
106 MCNAPI bool
107 GetSessionState(::NetherNet::NetworkID peerId, uint64 connectionId, ::NetherNet::SessionState* pConnectionState);
108
109 MCNAPI ::NetherNet::ESessionError InitiateIncomingSession(
110 ::NetherNet::NetworkID remoteID,
111 uint64 const& connectionId,
112 ::std::unique_ptr<::webrtc::SessionDescriptionInterface> pSessionDescription,
113 ::NetherNet::SignalingChannelId preference,
115 );
116
117 MCNAPI ::NetherNet::NetworkSession* InitiateOutgoingSession(
118 ::NetherNet::NetworkID remoteID,
120 );
121
122 MCNAPI bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize);
123
124 MCNAPI void NotifyOnSessionOpen(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
125
126 MCNAPI bool NotifyOnSessionRequested(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
127
129
130 MCNAPI void ProcessError(::NetherNet::NetworkID remoteID, uint64 connectionId, ::NetherNet::ESessionError error);
131
132 MCNAPI void ProcessSignal(
133 ::NetherNet::NetworkID remoteID,
134 ::NetherNet::ConnectError const& signal,
135 ::NetherNet::SignalingChannelId
136 ) const;
137
138 MCNAPI void ProcessSignal(
139 ::NetherNet::NetworkID remoteID,
140 ::NetherNet::ConnectResponse const& signal,
141 ::NetherNet::SignalingChannelId
142 ) const;
143
144 MCNAPI void ProcessSignal(
145 ::NetherNet::NetworkID remoteID,
146 ::NetherNet::CandidateAdd const& signal,
147 ::NetherNet::SignalingChannelId
148 );
149
150 MCNAPI void ProcessSignal(
151 ::NetherNet::NetworkID remoteID,
152 ::NetherNet::ConnectRequest const& signal,
153 ::NetherNet::SignalingChannelId sourceChannel
154 );
155
156 MCNAPI bool
157 ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void* pubDest, uint cbDest, uint* pcbMessageSize);
158
159 MCNAPI void
160 RemoteMessageReceived(::NetherNet::NetworkID remoteID, uint64 connectionId, void const* pvData, uint64 cbSize);
161
162 MCNAPI bool SendPacket(
163 ::NetherNet::NetworkID networkIDRemote,
164 uint64 connectionId,
165 char const* pbData,
166 uint cbData,
167 ::NetherNet::ESendType eSendType
168 );
169
170 MCNAPI ::NetherNet::ErrorOr<void, ::NetherNet::ESessionError> SendToSignalingChannel(
171 ::NetherNet::NetworkID networkIDTo,
172 ::std::variant<
176 ::NetherNet::CandidateAdd> const& signal,
177 ::std::optional<::NetherNet::SignalingChannelId> preference
178 );
179 // NOLINTEND
180
181public:
182 // vftables
183 // NOLINTBEGIN
184 MCNAPI static void** $vftable();
185 // NOLINTEND
186};
187
188} // 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 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:21
Definition NetworkSessionManager.h:35
Definition SessionState.h:7
Definition Alias.h:14