Detailed Description

A resource which streams data from memory.

Use this resource if you want to serve resource data from memory. This is suitable for relatively small resources, which still require some computation.

If creating the data requires computation which you would like to post-pone until the resource is served, then you may want to directly reimplement WResource instead and compute the data on the fly while streaming.

Member Function Documentation

Reimplement this method so that a proper response is generated for the given request. From the request object you can access request parameters and whether the request is a continuation request. In the response object, you should set the mime type and stream the output data.

A request may also concern a continuation, indicated in Http::Request::continuation(), in which case the next part for a previously created continuation should be served.

While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.