Sese Framework
2.3.0
A cross-platform framework
|
HTTP service implementation. More...
#include <HttpServiceImpl.h>
Public Member Functions | |
HttpServiceImpl (const sese::net::IPAddress::Ptr &address, SSLContextPtr ssl_context, uint32_t keepalive, std::string &serv_name, MountPointMap &mount_points, ServletMap &servlets, FilterCallback &tail_filter, FilterMap &filters, ConnectionCallback &connection_callback) | |
bool | startup () override |
bool | shutdown () override |
int | getLastError () override |
std::string | getLastErrorMessage () override |
uint32_t | getKeepalive () const |
void | handleFilter (const Handleable::Ptr &conn) const |
void | handleRequest (const Handleable::Ptr &conn) const |
Public Member Functions inherited from sese::service::Service | |
Service ()=default | |
virtual | ~Service ()=default |
ErrorCode | getErrorCode () |
Private Member Functions | |
void | handleAccept () |
void | handleSSLAccept () |
Static Private Member Functions | |
static int | alpnCallback (SSL *ssl, const uint8_t **out, uint8_t *out_length, const uint8_t *in, uint32_t in_length, void *data) |
Private Attributes | |
asio::io_context | io_context |
std::optional< asio::ssl::context > | ssl_context |
asio::ip::tcp::acceptor | acceptor |
asio::error_code | error |
std::set< HttpConnection::Ptr > | connections |
std::set< HttpConnectionEx::Ptr > | connections2 |
Static Private Attributes | |
static constexpr unsigned char | ALPN_PROTOS [] = "\x2h2\x8http/1.1" |
Friends | |
struct | HttpConnection |
struct | HttpConnectionEx |
HTTP service implementation.
sese::internal::service::http::HttpServiceImpl::HttpServiceImpl | ( | const sese::net::IPAddress::Ptr & | address, |
SSLContextPtr | ssl_context, | ||
uint32_t | keepalive, | ||
std::string & | serv_name, | ||
MountPointMap & | mount_points, | ||
ServletMap & | servlets, | ||
FilterCallback & | tail_filter, | ||
FilterMap & | filters, | ||
ConnectionCallback & | connection_callback ) |
References sese::service::http::HttpService::thread.
|
staticprivate |
References in().
|
inline |
References sese::service::http::HttpService::keepalive.
|
overridevirtual |
Implements sese::service::Service.
|
overridevirtual |
Implements sese::service::Service.
|
private |
References e.
void sese::internal::service::http::HttpServiceImpl::handleFilter | ( | const Handleable::Ptr & | conn | ) | const |
void sese::internal::service::http::HttpServiceImpl::handleRequest | ( | const Handleable::Ptr & | conn | ) | const |
References sese::io::FileStream::B_READ, sese::net::http::HttpUtil::content_type_map, sese::internal::service::http::CONTROLLER, sese::io::FileStream::create(), sese::internal::service::http::FILE_DOWNLOAD, sese::text::DateTimeFormatter::format(), HTTPD_BOUNDARY, sese::internal::service::http::NONE, sese::net::http::Range::parse(), sese::net::http::requestTypeToString(), SESE_INFO, sese::text::AbstractStringBuffer::startsWith(), sese::strcmpDoNotCase(), TIME_GREENWICH_MEAN_PATTERN, sese::to_time_t(), and sese::net::http::VERSION_1_1.
|
private |
References e.
|
overridevirtual |
Implements sese::service::Service.
References sese::sleep().
|
overridevirtual |
Implements sese::service::Service.
References sese::internal::net::convert().
|
friend |
|
friend |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
private |
|
private |