identt
List of all members
identt::http::HttpServer< socket_type > Class Template Reference
Inheritance diagram for identt::http::HttpServer< socket_type >:
identt::http::HttpServerBase< socket_type >

Additional Inherited Members

- Public Types inherited from identt::http::HttpServerBase< socket_type >
using RespPtr = std::shared_ptr< Response >
 
using ReqPtr = std::shared_ptr< Request >
 
- Public Member Functions inherited from identt::http::HttpServerBase< socket_type >
unsigned short bind ()
 If you know the server port in advance, use start() instead. More...
 
void accept_and_run ()
 If you know the server port in advance, use start() instead. More...
 
void start ()
 Start the server by calling bind() and accept_and_run()
 
void stop () noexcept
 Stop accepting new requests, and close current connections.
 
- Public Attributes inherited from identt::http::HttpServerBase< socket_type >
Config config
 Set before calling start().
 
std::map< regex_orderable, std::map< std::string, std::function< void(std::shared_ptr< typename HttpServerBase< socket_type >::Response >, std::shared_ptr< typename HttpServerBase< socket_type >::Request >)> > > resource
 Use this container to add resources for specific request paths depending on the given regex and method. More...
 
std::map< std::string, std::function< void(std::shared_ptr< typename HttpServerBase< socket_type >::Response >, std::shared_ptr< typename HttpServerBase< socket_type >::Request >)> > default_resource
 If the request path does not match a resource regex, this function is called.
 
std::function< void(std::shared_ptr< typename HttpServerBase< socket_type >::Request >, const error_code &)> on_error
 Called when an error occurs.
 
std::function< void(std::unique_ptr< socket_type > &, std::shared_ptr< typename HttpServerBase< socket_type >::Request >)> on_upgrade
 Called on upgrade requests.
 
std::shared_ptr<::identt::http::io_whatever > io_whatever
 If you want to reuse an already created asio::io_service, store its pointer here before calling start().
 
- Protected Member Functions inherited from identt::http::HttpServerBase< socket_type >
 HttpServerBase (unsigned short port) noexcept
 
virtual void after_bind ()
 
virtual void accept ()=0
 
template<typename... Args>
std::shared_ptr< Connectioncreate_connection (Args &&... args) noexcept
 
void read (const std::shared_ptr< Session > &session)
 
void read_chunked_transfer_encoded (const std::shared_ptr< Session > &session, const std::shared_ptr< asio::streambuf > &chunks_streambuf)
 
void read_chunked_transfer_encoded_chunk (const std::shared_ptr< Session > &session, const std::shared_ptr< asio::streambuf > &chunks_streambuf, unsigned long length)
 
void find_resource (const std::shared_ptr< Session > &session)
 
void write (const std::shared_ptr< Session > &session, std::function< void(std::shared_ptr< typename HttpServerBase< socket_type >::Response >, std::shared_ptr< typename HttpServerBase< socket_type >::Request >)> &resource_function)
 
- Protected Attributes inherited from identt::http::HttpServerBase< socket_type >
std::mutex start_stop_mutex
 
std::unique_ptr< asio::ip::tcp::acceptor > acceptor
 
std::shared_ptr< Connectionsconnections
 
std::shared_ptr< ScopeRunnerhandler_runner
 

The documentation for this class was generated from the following file: