#include <server.hpp>
|
template<typename RequestListenerT > |
void | addRoute (std::shared_ptr< RequestListenerT > listener, std::unordered_multimap< boost::beast::http::verb, ProtoRoute > &extractedRoutes, RouteInfo< RequestListenerT > const &info) |
|
template<typename RequestListenerT > |
void | addRoute (std::shared_ptr< RequestListenerT > listener, std::unordered_multimap< boost::beast::http::verb, ProtoRoute > &extractedRoutes, ServeInfo< RequestListenerT > const &info) |
|
void | addRequestListenerToRouter (std::unordered_multimap< boost::beast::http::verb, ProtoRoute > &&routes) |
|
◆ Server() [1/3]
Construct a new Server object given a boost asio io_executor.
- Parameters
-
constructionArgs | Options to construct the server with |
◆ ~Server()
Roar::Server::~Server |
( |
| ) |
|
◆ Server() [2/3]
Roar::Server::Server |
( |
Server const & |
| ) |
|
|
delete |
◆ Server() [3/3]
Roar::Server::Server |
( |
Server && |
| ) |
|
|
default |
◆ addRequestListenerToRouter()
void Roar::Server::addRequestListenerToRouter |
( |
std::unordered_multimap< boost::beast::http::verb, ProtoRoute > && |
routes | ) |
|
|
private |
◆ addRoute() [1/2]
template<typename RequestListenerT >
void Roar::Server::addRoute |
( |
std::shared_ptr< RequestListenerT > |
listener, |
|
|
std::unordered_multimap< boost::beast::http::verb, ProtoRoute > & |
extractedRoutes, |
|
|
RouteInfo< RequestListenerT > const & |
info |
|
) |
| |
|
inlineprivate |
◆ addRoute() [2/2]
template<typename RequestListenerT >
void Roar::Server::addRoute |
( |
std::shared_ptr< RequestListenerT > |
listener, |
|
|
std::unordered_multimap< boost::beast::http::verb, ProtoRoute > & |
extractedRoutes, |
|
|
ServeInfo< RequestListenerT > const & |
info |
|
) |
| |
|
inlineprivate |
◆ getExecutor()
boost::asio::any_io_executor Roar::Server::getExecutor |
( |
| ) |
const |
Get the Executor object.
- Returns
- boost::asio::any_io_executor& The ASIO any_io_executor.
◆ getLocalEndpoint()
Get the local endpoint that this server bound to.
- Returns
- boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const&
◆ installRequestListener()
template<typename RequestListenerT , typename... ConstructionArgsT>
std::shared_ptr< RequestListenerT > Roar::Server::installRequestListener |
( |
ConstructionArgsT &&... |
args | ) |
|
|
inline |
Attach a request listener to this server to receive requests.
- Parameters
-
◆ isSecure()
bool Roar::Server::isSecure |
( |
| ) |
const |
Returns whether this server has a certificate and key and is therefore a HTTPS server.
- Returns
- true is HTTPS.
-
false is not HTTPS.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ start() [1/2]
Starts the server given the already resolved bind endpoint.
- Parameters
-
bindEndpoint | An endpoint to bind on. |
◆ start() [2/2]
boost::leaf::result< void > Roar::Server::start |
( |
unsigned short |
port = 0 , |
|
|
std::string const & |
host = "::" |
|
) |
| |
Bind and listen for network interface and port.
- Parameters
-
host | An ip / hostname to identify the network interface to listen on. |
port | A port to bind on. |
◆ stop()
void Roar::Server::stop |
( |
| ) |
|
Stop and shutdown the server.
◆ impl_
The documentation for this class was generated from the following files: