3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/common/AppPlatformListener.h"
7#include "mc/deps/core/http/PersistentWebSocket.h"
8#include "mc/deps/core/threading/IAsyncResult.h"
9#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/nether_net/ESessionError.h"
12#include "mc/deps/nether_net/ISignalingInterface.h"
13#include "mc/platform/Result.h"
20namespace Bedrock::Http {
class HeaderCollection; }
21namespace Bedrock::Http {
class RetryPolicy; }
22namespace Bedrock::Http {
struct Url; }
23namespace Bedrock::PubSub {
class Subscription; }
24namespace NetherNet {
struct ISignalingEventHandler; }
25namespace NetherNet {
struct NetworkID; }
26namespace NetherNet {
struct StunRelayServer; }
38 enum class ConnectionStatus : uchar {
73 virtual void onMessage(::std::string_view incomingMessage) ;
76 virtual bool shouldReconnect()
const ;
79 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Url>> getUrl() ;
82 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::HeaderCollection>>
86 virtual ::Bedrock::Http::RetryPolicy getReconnectPolicy() ;
89 virtual void onConnect() ;
92 virtual void onDisconnect(
bool, uint closeStatus) ;
95 virtual void onAppSuspended() ;
98 virtual void onAppResumed() ;
106 ::Bedrock::NotNullNonOwnerPtr<::ISignalingServiceConfigProvider> serviceConfigProvider,
107 ::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing> eventing
112 MCNAPI
void _parseError(::std::string
const& message, ::std::string messageId);
116 MCNAPI ::Bedrock::Result<::std::vector<::NetherNet::StunRelayServer>, ::NetherNet::ESessionError>
123 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::std::error_code>>
connect();
125 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::NetherNet::ESessionError>>
136 ::Bedrock::NotNullNonOwnerPtr<::ISignalingServiceConfigProvider> serviceConfigProvider,
137 ::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing> eventing
154 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Url>>
$getUrl();
156 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::HeaderCollection>>
$getHeaders();
199 virtual void SendSignal(
201 ::std::string
const& message,
202 ::std::function<
void(::NetherNet::ESessionError)>&& onComplete
206 virtual ::Bedrock::PubSub::Subscription
215 ::std::string
const& message,
216 ::std::function<
void(::NetherNet::ESessionError)>&& onComplete
256 MCNAPI
explicit SignalingService(::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing> eventing);
260 MCNAPI ::gsl::not_null<::std::shared_ptr<::NetherNet::ISignalingInterface>>
getChannel()
const;
262 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::std::vector<::NetherNet::StunRelayServer>>>
265 MCNAPI ::std::shared_ptr<::ISignalingServiceTelemetry const>
getTelemetry()
const;
273 MCNAPI
void*
$ctor(::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing> eventing);
Definition EnableNonOwnerReferences.h:7
Definition PersistentWebSocket.h:20
Definition IMinecraftEventing.h:144
Definition ISignalingServiceConfigProvider.h:14
Definition ISignalingServiceTelemetry.h:14
Definition ISignalingInterface.h:17
Definition SignalingService.h:178
MCAPI void $SendSignal(::NetherNet::NetworkID to, ::std::string const &message, ::std::function< void(::NetherNet::ESessionError)> &&onComplete)
MCAPI::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ISignalingEventHandler *handler)
static MCAPI void ** $vftable()
Definition SignalingService.h:43
MCAPI ::Bedrock::Result<::std::vector<::NetherNet::StunRelayServer >, ::NetherNet::ESessionError > _parseTurnConfig(::std::string const &bodyText)
MCAPI void _parseError(::std::string const &message, ::std::string messageId)
MCAPI void _sendPing() const
static MCAPI void ** $vftableForAppPlatformListener()
MCAPI Connection(::NetherNet::NetworkID id, ::Bedrock::NotNullNonOwnerPtr<::ISignalingServiceConfigProvider > serviceConfigProvider, ::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing > eventing)
MCAPI void _parseSignal(::NetherNet::NetworkID fromNetworkID, ::std::string message, ::std::string messageId)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::HeaderCollection > > $getHeaders()
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::std::error_code > > connect()
static MCAPI void ** $vftableForPersistentWebSocket()
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::NetherNet::ESessionError > > sendTo(::NetherNet::NetworkID to, ::std::string const &message)
MCAPI void * $ctor(::NetherNet::NetworkID id, ::Bedrock::NotNullNonOwnerPtr<::ISignalingServiceConfigProvider > serviceConfigProvider, ::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing > eventing)
MCAPI void $onAppSuspended()
MCAPI void $onDisconnect(bool, uint closeStatus)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Url > > $getUrl()
MCAPI::Bedrock::Http::RetryPolicy $getReconnectPolicy()
MCAPI void $onAppResumed()
MCAPI bool $shouldReconnect() const
MCAPI void _requestTurnConfig() const
MCAPI void $onMessage(::std::string_view incomingMessage)
Definition SignalingService.h:29
MCAPI void * $ctor(::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing > eventing)
MCAPI ::std::shared_ptr<::SignalingService::Connection > _makeConnection(::NetherNet::NetworkID id)
MCAPI SignalingService(::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing > eventing)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::std::vector<::NetherNet::StunRelayServer > > > getRelayConfig() const
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::std::error_code > > signIn(::NetherNet::NetworkID id)
MCAPI ::gsl::not_null<::std::shared_ptr<::NetherNet::ISignalingInterface > > getChannel() const
MCAPI ::std::shared_ptr<::ISignalingServiceTelemetry const > getTelemetry() const
static MCAPI void ** $vftable()
Definition ISignalingEventHandler.h:12
Definition NetworkID.h:17