3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/http/StatusCode.h"
7#include "mc/deps/core/threading/Async.h"
8#include "mc/deps/core/threading/AsyncPromise.h"
17namespace Bedrock::Http {
19class WebSocket :
public ::std::enable_shared_from_this<::Bedrock::Http::WebSocket> {
31 WebSocket& operator=(WebSocket
const&);
39 virtual ::Bedrock::Threading::Async<::std::error_code> send(::std::string
const& message)
const;
41 virtual void onMessage(::std::string_view message);
43 virtual void onBinaryMessage(::gsl::span<uchar const>);
45 virtual void onClose(uint status);
53 MCNAPI ::Bedrock::Threading::Async<::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code>>
62 ::std::shared_ptr<::Bedrock::Http::Internal::WebSocketCallbackContext> callbackContext
81 MCNAPI ::Bedrock::Threading::Async<::std::error_code>
$send(::std::string
const& message)
const;
MCAPI void $onMessage(::std::string_view message)
static MCAPI void ** $vftable()
MCAPI ::Bedrock::Threading::Async<::std::error_code > $send(::std::string const &message) const
MCAPI void $onClose(uint status)
MCAPI ::Bedrock::Threading::Async<::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code > > connect(::std::string const &uri, ::Bedrock::Http::HeaderCollection const &headers)
static MCAPI void _deallocateSocketAsync(::HC_WEBSOCKET_OBSERVER *handle, ::std::shared_ptr<::Bedrock::Http::Internal::WebSocketCallbackContext > callbackContext)
MCAPI void $onBinaryMessage(::gsl::span< uchar const >)
Definition WebSocketCallbackContext.h:8
Definition HC_WEBSOCKET_OBSERVER.h:8