Click or drag to resize
CfxResourceHandler Class

[This is preliminary documentation and is subject to change.]

Structure used to implement a custom request handler structure. The functions of this structure will always be called on the IO thread.
Inheritance Hierarchy
SystemObject
  ChromiumCfxObject
    ChromiumCfxBase
      ChromiumCfxClientBase
        ChromiumCfxResourceHandler

Namespace: Chromium
Assembly: ChromiumFX (in ChromiumFX.dll)
Syntax
public class CfxResourceHandler : CfxClientBase

The CfxResourceHandler type exposes the following members.

Constructors
  NameDescription
Public methodCfxResourceHandler
Initializes a new instance of the CfxResourceHandler class
Top
Properties
  NameDescription
Public propertyCallbacksDisabled
When true, all CEF callback events are disabled for this handler. Incoming callbacks will return default values to CEF.
(Inherited from CfxClientBase.)
Public propertyNativePtr
Provides access to the underlying native cef struct. This is a refcounted client struct derived from cef_base_t. Add a ref in order to keep it alive when this managed object go out of scope.
(Inherited from CfxClientBase.)
Top
Events
  NameDescription
Public eventCancel
Request processing has been canceled.
Public eventCanGetCookie
Return true (1) if the specified cookie can be sent with the request or false (0) otherwise. If false (0) is returned for any cookie then no cookies will be sent with the request.
Public eventCanSetCookie
Return true (1) if the specified cookie returned with the response can be set or false (0) otherwise.
Public eventGetResponseHeaders
Retrieve response header information. If the response length is not known set |ResponseLength| to -1 and read_response() will be called until it returns false (0). If the response length is known set |ResponseLength| to a positive value and read_response() will be called until it returns false (0) or the specified number of bytes have been read. Use the |Response| object to set the mime type, http status code and other optional header values. To redirect the request to a new URL set |RedirectUrl| to the new URL. If an error occured while setting up the request you can call set_error() on |Response| to indicate the error condition.
Public eventProcessRequest
Begin processing the request. To handle the request return true (1) and call CfxCallback.Continue() once the response header information is available (CfxCallback.Continue() can also be called from inside this function if header information is available immediately). To cancel the request return false (0).
Public eventReadResponse
Read response data. If data is available immediately copy up to |BytesToRead| bytes into |DataOut|, set |BytesRead| to the number of bytes copied, and return true (1). To read the data at a later time set |BytesRead| to 0, return true (1) and call CfxCallback.Continue() when the data is available. To indicate response completion return false (0).
Top
Remarks
See also the original CEF documentation in cef/include/capi/cef_resource_handler_capi.h.
See Also