#include <EventSource.h>
Classes | |
| struct | SharedConfig |
Public Types | |
| using | MasterRequest = typename Client::MasterRequest |
| using | Request = typename Client::Request |
| using | Response = typename Client::Response |
| using | SocketConnection = typename Client::SocketConnection |
| using | SocketAddress = typename SocketConnection::SocketAddress |
| using | Config = typename Client::Config |
| Public Types inherited from web::http::client::tools::EventSource | |
| enum class | ReadyState : int { CONNECTING = 0 , OPEN = 1 , CLOSED = 2 } |
Public Member Functions | |
| EventSourceT (const EventSourceT &)=delete | |
| EventSourceT & | operator= (const EventSourceT &)=delete |
| EventSourceT (EventSourceT &&) noexcept=delete | |
| EventSourceT & | operator= (EventSourceT &&) noexcept=delete |
| void | close () override |
| Public Member Functions inherited from web::http::client::tools::EventSource | |
| virtual | ~EventSource () |
| EventSource * | onMessage (std::function< void(const MessageEvent &)> messageCallback) |
| EventSource * | addEventListener (const std::string &key, std::function< void(const MessageEvent &)> eventListener) |
| EventSource * | removeEventListeners (const std::string &type) |
| EventSource * | onOpen (std::function< void()> onOpen) |
| EventSource * | onError (std::function< void()> onError) |
| EventSource::ReadyState | readyState () const |
| const std::string & | lastEventId () const |
| uint32_t | retry () const |
| EventSource * | retry (uint32_t retry) |
Protected Member Functions | |
| EventSourceT () | |
| void | init (const std::string &scheme, const SocketAddress &socketAddress, const std::string &path) |
| Protected Member Functions inherited from web::http::client::tools::EventSource | |
| EventSource () | |
Static Private Member Functions | |
| static bool | digits (std::string_view maybeDigitsAsString) |
| static uint32_t | parseU32 (std::string_view uint32AsString) |
| static void | deliverMessage (const std::shared_ptr< SharedState > &sharedState, const std::string &evType, const std::string &payload, const std::string &evId) |
| static void | dispatch (const std::shared_ptr< SharedState > &sharedState) |
| static bool | processLine (const std::shared_ptr< SharedState > &sharedState, const std::shared_ptr< SharedConfig > &sharedConfig, std::string_view line) |
| static bool | parse (const std::shared_ptr< SharedState > &sharedState, const std::shared_ptr< SharedConfig > &sharedConfig) |
Private Attributes | |
| std::shared_ptr< Client > | client |
| SocketConnection * | socketConnection = nullptr |
| std::shared_ptr< SharedConfig > | sharedConfig |
Additional Inherited Members | |
| Protected Attributes inherited from web::http::client::tools::EventSource | |
| std::shared_ptr< SharedState > | sharedState |
Definition at line 121 of file EventSource.h.
| using web::http::client::tools::EventSourceT< Client >::Config = typename Client::Config |
Definition at line 130 of file EventSource.h.
| using web::http::client::tools::EventSourceT< Client >::MasterRequest = typename Client::MasterRequest |
Definition at line 125 of file EventSource.h.
| using web::http::client::tools::EventSourceT< Client >::Request = typename Client::Request |
Definition at line 126 of file EventSource.h.
| using web::http::client::tools::EventSourceT< Client >::Response = typename Client::Response |
Definition at line 127 of file EventSource.h.
| using web::http::client::tools::EventSourceT< Client >::SocketAddress = typename SocketConnection::SocketAddress |
Definition at line 129 of file EventSource.h.
| using web::http::client::tools::EventSourceT< Client >::SocketConnection = typename Client::SocketConnection |
Definition at line 128 of file EventSource.h.
|
delete |
|
deletenoexcept |
|
inlineprotected |
Definition at line 283 of file EventSource.h.
|
inlineoverridevirtual |
Implements web::http::client::tools::EventSource.
Definition at line 429 of file EventSource.h.
|
inlinestaticprivate |
Definition at line 160 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::dispatch().
|
inlinestaticprivate |
Definition at line 137 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::processLine().
|
inlinestaticprivate |
Definition at line 179 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::parse().
|
inlineprotected |
Definition at line 287 of file EventSource.h.
Referenced by web::http::legacy::in6::EventSource::EventSource, web::http::legacy::in::EventSource(), web::http::legacy::rc::EventSource::EventSource, web::http::legacy::un::EventSource(), web::http::tls::in6::EventSource(), web::http::tls::in::EventSource(), web::http::tls::rc::EventSource(), and web::http::tls::un::EventSource().
|
delete |
|
deletenoexcept |
|
inlinestaticprivate |
Definition at line 244 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::init().
|
inlinestaticprivate |
Definition at line 147 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::processLine().
|
inlinestaticprivate |
Definition at line 196 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::parse().
|
private |
Definition at line 441 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::init().
|
private |
Definition at line 443 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::close(), web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::EventSourceT(), and web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::init().
|
private |
Definition at line 442 of file EventSource.h.
Referenced by web::http::client::tools::EventSourceT< web::http::legacy::in::Client >::close().