Kagome
Polkadot Runtime Engine in C++17
|
server which listens for incoming connection, accepts connections making session from socket More...
#include <http_listener_impl.hpp>
Public Types | |
using | SessionImpl = HttpSession |
Public Types inherited from kagome::api::Listener | |
using | Context = RpcContext |
Public Member Functions | |
HttpListenerImpl (const std::shared_ptr< application::AppStateManager > &app_state_manager, std::shared_ptr< Context > context, Configuration listener_config, SessionImpl::Configuration session_config) | |
~HttpListenerImpl () override=default | |
bool | prepare () override |
bool | start () override |
void | stop () override |
void | setHandlerForNewSession (NewSessionHandler &&on_new_session) override |
Set handler for working new session. More... | |
Public Member Functions inherited from kagome::api::Listener | |
virtual | ~Listener ()=default |
Private Member Functions | |
void | acceptOnce () override |
Accept incoming connection. More... | |
Private Attributes | |
std::shared_ptr< Context > | context_ |
const Configuration | config_ |
const SessionImpl::Configuration | session_config_ |
std::unique_ptr< Acceptor > | acceptor_ |
std::unique_ptr< NewSessionHandler > | on_new_session_ |
std::shared_ptr< SessionImpl > | new_session_ |
log::Logger | logger_ |
Additional Inherited Members | |
Protected Types inherited from kagome::api::Listener | |
using | Acceptor = boost::asio::ip::tcp::acceptor |
using | Endpoint = boost::asio::ip::tcp::endpoint |
using | NewSessionHandler = std::function< void(const std::shared_ptr< Session > &)> |
server which listens for incoming connection, accepts connections making session from socket
Definition at line 23 of file http_listener_impl.hpp.
Definition at line 27 of file http_listener_impl.hpp.
kagome::api::HttpListenerImpl::HttpListenerImpl | ( | const std::shared_ptr< application::AppStateManager > & | app_state_manager, |
std::shared_ptr< Context > | context, | ||
Configuration | listener_config, | ||
SessionImpl::Configuration | session_config | ||
) |
Definition at line 15 of file http_listener_impl.cpp.
|
overridedefault |
|
overrideprivatevirtual |
Accept incoming connection.
Implements kagome::api::Listener.
Definition at line 78 of file http_listener_impl.cpp.
|
overridevirtual |
Implements kagome::api::Listener.
Definition at line 28 of file http_listener_impl.cpp.
|
overridevirtual |
Set handler for working new session.
Implements kagome::api::Listener.
Definition at line 72 of file http_listener_impl.cpp.
|
overridevirtual |
Implements kagome::api::Listener.
Definition at line 50 of file http_listener_impl.cpp.
|
overridevirtual |
Implements kagome::api::Listener.
Definition at line 66 of file http_listener_impl.cpp.
|
private |
Definition at line 55 of file http_listener_impl.hpp.
|
private |
Definition at line 52 of file http_listener_impl.hpp.
|
private |
Definition at line 51 of file http_listener_impl.hpp.
|
private |
Definition at line 60 of file http_listener_impl.hpp.
|
private |
Definition at line 58 of file http_listener_impl.hpp.
|
private |
Definition at line 56 of file http_listener_impl.hpp.
|
private |
Definition at line 53 of file http_listener_impl.hpp.