This just schedules a write, so the Bigstring.t
should not be overwritten until
the flushed Deferred.t
is determined.
The return value of handle_response
has the same meaning as in the function
argument of Implementations.Expert.create
.
Result of callbacks passed to implement
and implement'
:
Replied
means that the response has already been sent using one of the
functions of Responder
Delayed_response d
means that the implementation is done using the input
bigstring, but hasn't send the response yet. When d
becomes determined
it is expected that the response has been sent.Note: it is not OK for an implementation to return:
Delayed_response (Responder.schedule responder buf ~pos:... ~len:...)
where buf
is the same bigstring as the one containing the query. This is because
it would indicate that buf
can be overwritten even though it is still being used
by Responder.schedule
.