Typedef foxglove::ServiceHandler¶
Defined in File service.hpp
Typedef Documentation¶
-
using foxglove::ServiceHandler = std::function<void(const ServiceRequest &request, ServiceResponder &&responder)>¶
A service handler callback.
This callback is invoked from the client’s main poll loop and must not block. If blocking or long-running behavior is required, the implementation should return immediately and handle the request asynchronously.
The
responderrepresents an unfulfilled response. The implementation must eventually call eitherrespondOkorrespondError, exactly once, in order to complete the request. It is safe to invoke these completion methods synchronously from the context of the callback.- Param request:
The client request.
- Param responder:
The responder used to send a response to the client.