cef_resource_handler_t.read

Read response data. If data is available immediately copy up to |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of bytes copied, and return true (1). To read the data at a later time keep a pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute |callback| when the data is available (|data_out| will remain valid until the callback is executed). To indicate response completion set |bytes_read| to 0 and return false (0). To indicate failure set |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This function will be called in sequence but not from a dedicated thread. For backwards compatibility set |bytes_read| to -1 and return false (0) and the ReadResponse function will be called.

struct cef_resource_handler_t
extern (System)
int function(cef_resource_handler_t* self, void* data_out, int bytes_to_read, int* bytes_read, cef_resource_read_callback_t* callback) nothrow read;

Meta