31 PersistentWebSocket& operator=(PersistentWebSocket
const&);
32 PersistentWebSocket(PersistentWebSocket
const&);
37 PersistentWebSocket& operator=(PersistentWebSocket
const&);
38 PersistentWebSocket(PersistentWebSocket
const&);
39 PersistentWebSocket();
45 virtual ~PersistentWebSocket() ;
47 virtual bool shouldReconnect()
const;
49 virtual ::Bedrock::Threading::Async<::Bedrock::Http::Url> getUrl() = 0;
51 virtual ::Bedrock::Threading::Async<::Bedrock::Http::HeaderCollection> getHeaders();
53 virtual ::Bedrock::Http::RetryPolicy getReconnectPolicy();
55 virtual void onConnect();
57 virtual void onDisconnect(
bool, uint);
59 virtual void onClose(uint status) ;
66 MCNAPI PersistentWebSocket();
70 ::std::string
const& uri,
72 ::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code>,
79 ::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code> result,
84 ::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code> lastResult,
88 MCNAPI ::Bedrock::Threading::Async<::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code>>
113 MCNAPI ::Bedrock::Threading::Async<::Bedrock::Http::HeaderCollection>
$getHeaders();
MCAPI void _connectWithRetry(::std::string const &uri, ::Bedrock::Http::HeaderCollection const &headers, ::nonstd::expected<::Bedrock::Http::StatusCode, ::std::error_code >, ::Bedrock::Http::RetryPolicy &&retry)