Wire Sysio Wire Sysion 1.0.0
|
Classes | |
struct | abstract_conn_impl |
struct | in_flight |
Public Member Functions | |
http_plugin_impl ()=default | |
http_plugin_impl (const http_plugin_impl &)=delete | |
http_plugin_impl (http_plugin_impl &&)=delete | |
http_plugin_impl & | operator= (const http_plugin_impl &)=delete |
http_plugin_impl & | operator= (http_plugin_impl &&)=delete |
bool | host_port_is_valid (const std::string &header_host_port, const string &endpoint_local_host_port) |
bool | host_is_valid (const std::string &host, const string &endpoint_local_host_port, bool secure) |
ssl_context_ptr | on_tls_init (websocketpp::connection_hdl hdl) |
template<class T > | |
bool | allow_host (const typename T::request_type &req, detail::connection_ptr< T > con) |
template<typename T > | |
bool | verify_max_bytes_in_flight (const T &con) |
template<typename T > | |
auto | make_http_response_handler (detail::abstract_conn_ptr abstract_conn_ptr) |
template<class T > | |
void | handle_http_request (detail::connection_ptr< T > con) |
template<class T > | |
void | create_server_for_endpoint (const tcp::endpoint &ep, websocketpp::server< detail::asio_with_stub_log< T > > &ws) |
void | add_aliases_for_endpoint (const tcp::endpoint &ep, string host, string port) |
Static Public Member Functions | |
template<class T > | |
static void | handle_exception (detail::connection_ptr< T > con) |
template<typename T > | |
static detail::abstract_conn_ptr | make_abstract_conn_ptr (detail::connection_ptr< T > conn, http_plugin_impl_ptr impl) |
template<typename T > | |
static auto | make_in_flight (T &&object, http_plugin_impl_ptr impl) |
static detail::internal_url_handler | make_app_thread_url_handler (int priority, url_handler next, http_plugin_impl_ptr my) |
static detail::internal_url_handler | make_http_thread_url_handler (url_handler next) |
Public Attributes | |
map< string, detail::internal_url_handler > | url_handlers |
std::optional< tcp::endpoint > | listen_endpoint |
string | access_control_allow_origin |
string | access_control_allow_headers |
string | access_control_max_age |
bool | access_control_allow_credentials = false |
size_t | max_body_size {2*1024*1024} |
websocket_server_type | server |
uint16_t | thread_pool_size = 2 |
std::optional< sysio::chain::named_thread_pool > | thread_pool |
std::atomic< size_t > | bytes_in_flight {0} |
size_t | max_bytes_in_flight = 0 |
fc::microseconds | max_response_time {30*1000} |
std::optional< tcp::endpoint > | https_listen_endpoint |
string | https_cert_chain |
string | https_key |
https_ecdh_curve_t | https_ecdh_curve = SECP384R1 |
websocket_server_tls_type | https_server |
std::optional< asio::local::stream_protocol::endpoint > | unix_endpoint |
websocket_local_server_type | unix_server |
bool | validate_host = true |
set< string > | valid_hosts |
Definition at line 179 of file http_plugin.cpp.
|
default |
|
delete |
|
delete |
|
inline |
Definition at line 620 of file http_plugin.cpp.
|
inline |
Definition at line 315 of file http_plugin.cpp.
|
inline |
Definition at line 601 of file http_plugin.cpp.
|
inlinestatic |
Definition at line 274 of file http_plugin.cpp.
|
inline |
Definition at line 551 of file http_plugin.cpp.
|
inline |
ends in :<number> without a preceeding colon which implies ipv6
Definition at line 223 of file http_plugin.cpp.
|
inline |
Definition at line 219 of file http_plugin.cpp.
|
inlinestatic |
Helper to construct an abstract_conn_impl for a given connection and instance of http_plugin_impl
T | - The downstream parameter for the connection_ptr |
conn | - existing connection_ptr<T> |
impl | - the owning http_plugin_impl |
Definition at line 394 of file http_plugin.cpp.
|
inlinestatic |
Make an internal_url_handler that will run the url_handler on the app() thread and then return to the http thread pool for response processing
priority | - priority to post to the app thread at |
next | - the next handler for responses |
my | - the http_plugin_impl |
Definition at line 478 of file http_plugin.cpp.
|
inline |
Construct a lambda appropriate for url_response_callback that will JSON-stringify the provided response
con | - pointer for the connection this response should be sent to |
Definition at line 529 of file http_plugin.cpp.
|
inlinestatic |
Make an internal_url_handler that will run the url_handler directly
next | - the next handler for responses |
Definition at line 511 of file http_plugin.cpp.
|
inlinestatic |
convenient wrapper to make an in_flight<T>
Definition at line 464 of file http_plugin.cpp.
|
inline |
Definition at line 238 of file http_plugin.cpp.
|
delete |
|
delete |
|
inline |
Definition at line 329 of file http_plugin.cpp.
bool sysio::http_plugin_impl::access_control_allow_credentials = false |
Definition at line 195 of file http_plugin.cpp.
string sysio::http_plugin_impl::access_control_allow_headers |
Definition at line 193 of file http_plugin.cpp.
string sysio::http_plugin_impl::access_control_allow_origin |
Definition at line 192 of file http_plugin.cpp.
string sysio::http_plugin_impl::access_control_max_age |
Definition at line 194 of file http_plugin.cpp.
std::atomic<size_t> sysio::http_plugin_impl::bytes_in_flight {0} |
Definition at line 202 of file http_plugin.cpp.
string sysio::http_plugin_impl::https_cert_chain |
Definition at line 207 of file http_plugin.cpp.
https_ecdh_curve_t sysio::http_plugin_impl::https_ecdh_curve = SECP384R1 |
Definition at line 209 of file http_plugin.cpp.
string sysio::http_plugin_impl::https_key |
Definition at line 208 of file http_plugin.cpp.
std::optional<tcp::endpoint> sysio::http_plugin_impl::https_listen_endpoint |
Definition at line 206 of file http_plugin.cpp.
websocket_server_tls_type sysio::http_plugin_impl::https_server |
Definition at line 211 of file http_plugin.cpp.
std::optional<tcp::endpoint> sysio::http_plugin_impl::listen_endpoint |
Definition at line 191 of file http_plugin.cpp.
size_t sysio::http_plugin_impl::max_body_size {2*1024*1024} |
Definition at line 196 of file http_plugin.cpp.
size_t sysio::http_plugin_impl::max_bytes_in_flight = 0 |
Definition at line 203 of file http_plugin.cpp.
fc::microseconds sysio::http_plugin_impl::max_response_time {30*1000} |
Definition at line 204 of file http_plugin.cpp.
websocket_server_type sysio::http_plugin_impl::server |
Definition at line 198 of file http_plugin.cpp.
std::optional<sysio::chain::named_thread_pool> sysio::http_plugin_impl::thread_pool |
Definition at line 201 of file http_plugin.cpp.
uint16_t sysio::http_plugin_impl::thread_pool_size = 2 |
Definition at line 200 of file http_plugin.cpp.
std::optional<asio::local::stream_protocol::endpoint> sysio::http_plugin_impl::unix_endpoint |
Definition at line 213 of file http_plugin.cpp.
websocket_local_server_type sysio::http_plugin_impl::unix_server |
Definition at line 214 of file http_plugin.cpp.
map<string,detail::internal_url_handler> sysio::http_plugin_impl::url_handlers |
Definition at line 190 of file http_plugin.cpp.
set<string> sysio::http_plugin_impl::valid_hosts |
Definition at line 217 of file http_plugin.cpp.
bool sysio::http_plugin_impl::validate_host = true |
Definition at line 216 of file http_plugin.cpp.