IResourceHandlerRead Method |
Version 99.2.120
Read response data. If data is available immediately copy up to
dataOut.Length bytes into dataOut, set bytesRead to the number of
bytes copied, and return true. To read the data at a later time keep a
pointer to dataOut, set bytesRead to 0, return true and execute
callback when the data is available (dataOut will remain valid until
the callback is executed). To indicate response completion set bytesRead
to 0 and return false. To indicate failure set bytesRead to < 0 (e.g. -2
for ERR_FAILED) and return false. This method will be called in sequence
but not from a dedicated thread.
For backwards compatibility set bytesRead to -1 and return false and the ReadResponse method will be called.
Namespace:
CefSharp
Assembly:
CefSharp (in CefSharp.dll) Version: 99.2.120.0 (99.2.120.0)
Syntax bool Read(
Stream dataOut,
out int bytesRead,
IResourceReadCallback callback
)
bool Read(
Stream^ dataOut,
[OutAttribute] int% bytesRead,
IResourceReadCallback^ callback
)
Parameters
- dataOut
- Type: System.IOStream
If data is available immediately copy up to Length bytes into dataOut. - bytesRead
- Type: SystemInt32
To indicate response completion set bytesRead to 0 and return false. - callback
- Type: CefSharp.CallbackIResourceReadCallback
set bytesRead to 0, return true and execute callback when the data is available
(dataOut will remain valid until the callback is executed). If you have no need
of the callback then Dispose of it immediately.
Return Value
Type:
Booleanreturn true or false depending on the criteria, see summary.
See Also