#include <icy/http/server.h>Base responder interface for handling one HTTP request on a server connection. Derived classes typically override [onRequest()](#onrequest) and optionally the streaming hooks.
| Return | Name | Description |
|---|---|---|
ServerResponder inline | Creates a ServerResponder for the given connection. | |
void | onHeaders virtual inline | Called when the incoming request headers have been parsed. |
void | onPayload virtual inline | Called for each chunk of incoming request body data. |
void | onRequest virtual inline | Called when the complete HTTP request has been received. Derived classes should write their response here. |
void | onClose virtual inline | Called when the connection is closed. |
ServerConnection & | connection inline | Returns the underlying server connection. |
Request & | request inline | Returns the current HTTP request from the underlying connection. |
Response & | response inline | Returns the current HTTP response from the underlying connection. |
inline
inline ServerResponder(ServerConnection & connection)Creates a ServerResponder for the given connection.
connection The server connection this responder handles.virtual inline
virtual inline void onHeaders(Request & request)Called when the incoming request headers have been parsed.
request The parsed HTTP request with headers populated.virtual inline
virtual inline void onPayload(const MutableBuffer & body)Called for each chunk of incoming request body data.
body Buffer containing a chunk of the request body.virtual inline
virtual inline void onRequest(Request & request, Response & response)Called when the complete HTTP request has been received. Derived classes should write their response here.
request The fully received HTTP request.
response The HTTP response to populate and send.
virtual inline
virtual inline void onClose()Called when the connection is closed.
inline
inline ServerConnection & connection()Returns the underlying server connection.
inline
inline Request & request()Returns the current HTTP request from the underlying connection.
inline
inline Response & response()Returns the current HTTP response from the underlying connection.
| Return | Name | Description |
|---|---|---|
ServerConnection & | _connection |
ServerConnection & _connection| Return | Name | Description |
|---|---|---|
ServerResponder | Deleted constructor. |
ServerResponder(const ServerResponder &) = deleteDeleted constructor.