$darkmode
#include <server.hpp>
Public Member Functions | |
| Server (const cloe::ServerConf &config) | |
| const cloe::ServerConf & | config () const |
| virtual bool | is_listening () const =0 |
| virtual bool | is_streaming () const =0 |
| virtual void | start ()=0 |
| virtual void | stop ()=0 |
| virtual void | init_stream (const std::string &filename)=0 |
| virtual void | enroll (cloe::Registrar &r)=0 |
| virtual std::unique_ptr< ServerRegistrar > | server_registrar ()=0 |
| virtual void | refresh_buffer_start_stream ()=0 |
| virtual void | refresh_buffer ()=0 |
| virtual Defer | lock ()=0 |
Protected Member Functions | |
| cloe::Logger | logger () const |
Protected Attributes | |
| cloe::ServerConf | config_ |
Server interface to make altering the implementation easier.
Use make_server() to create an instance that you can use.
|
inline |
Return the server configuration.
|
pure virtual |
Register a list of all endpoints.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Open a file for api data streaming. This does not require a running web server.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Return whether the server is alive and listening for requests.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Return whether the server is currently streaming buffer data to a file.
If it is, expect performance to be bad.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Return a write lock guard on the server.
Keep the returned value alive for as long as the server should be locked. Once the destructor is called, the lock is released.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Refresh and/or write api data to a file.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Refresh and/or start streaming api data to a file.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Return a new ServerRegistrar that lets you register static content and API endpoints with the web server.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Start the web server.
Implemented in engine::ServerImpl, and engine::ServerImpl.
|
pure virtual |
Stop all server-related procedures.
Implemented in engine::ServerImpl, and engine::ServerImpl.