Public Member Functions | |
| Result | start (AsyncEventLoop &loop, StringSpan address, uint16_t port, HttpServer::Memory &memory) |
| Starts the http server on the given AsyncEventLoop, address and port. | |
| Result | stopAsync () |
| Stops http server asynchronously pushing cancel and close requests for next SC::AsyncEventLoop::runOnce. | |
| Result | stopSync () |
| Stops http server synchronously waiting for SC::AsyncEventLoop::runNoWait to cancel or close all requests. | |
| bool | isStarted () const |
| Returns true if the server has been started. | |
| void | setupStreamsMemory (Span< AsyncReadableStream::Request > readQueue, Span< AsyncWritableStream::Request > writeQueue, Span< AsyncBufferView > buffers) |
| Enables using AsyncStreams instead of raw Async Send and Receive. | |
Public Attributes | |
| HttpServer | httpServer |
| The underlying http server. | |
|
inlinenodiscard |
Returns true if the server has been started.
| void SC::HttpAsyncServer::setupStreamsMemory | ( | Span< AsyncReadableStream::Request > | readQueue, |
| Span< AsyncWritableStream::Request > | writeQueue, | ||
| Span< AsyncBufferView > | buffers ) |
Enables using AsyncStreams instead of raw Async Send and Receive.
| Result SC::HttpAsyncServer::start | ( | AsyncEventLoop & | loop, |
| StringSpan | address, | ||
| uint16_t | port, | ||
| HttpServer::Memory & | memory ) |
Starts the http server on the given AsyncEventLoop, address and port.
| loop | The event loop to be used, where to add the listening socket |
| address | The address of local interface where to listen to |
| port | The local port where to start listening to |
| memory | Memory buffers to be used by the http server |
| Result SC::HttpAsyncServer::stopAsync | ( | ) |
Stops http server asynchronously pushing cancel and close requests for next SC::AsyncEventLoop::runOnce.
| Result SC::HttpAsyncServer::stopSync | ( | ) |
Stops http server synchronously waiting for SC::AsyncEventLoop::runNoWait to cancel or close all requests.
| HttpServer SC::HttpAsyncServer::httpServer |
The underlying http server.