cohtml.Net.ResourceHandler
Class that will handle all asynchronous resource requests.
Inherits from SystemIDisposable
Inherited by cohtml.DefaultResourceHandler
Public Functions
| Name | |
|---|---|
| virtual void | Dispose() |
| virtual void | OnResourceRequest(ResourceRequest request, ResourceResponse response) Called when Cohtml needs a resource. |
| virtual void | OnAbortResourceRequest(uint id) Called when a requested resource is not needed anymore. |
| delegate void | SwigDelegateResourceHandler_0(global.System.IntPtr request, global.System.IntPtr response, global.System.IntPtr swigId) |
| delegate void | SwigDelegateResourceHandler_1(uint id, global.System.IntPtr swigId) |
Protected Functions
| Name | |
|---|---|
| ResourceHandler() |
Protected Attributes
| Name | |
|---|---|
| bool | swigCMemOwn |
Public Functions Documentation
function Dispose
virtual void Dispose()
Reimplemented by: cohtml.DefaultResourceHandler.Dispose
function OnResourceRequest
virtual void OnResourceRequest(
ResourceRequest request,
ResourceResponse response
)
Called when Cohtml needs a resource.
Parameters:
- request object describing the resource requested
- response response object for result of loading the request
Note: The OnResourceRequest call happens immediately when Cohtml requests a resource. No further Cohtml work will be executed on that thread until the call returns. To avoid blocking the current thread unnecessarily, the client can respond to the request on another thread and quickly return from the OnResourceRequest call. In that case, it is up to the client to manage possible race conditions between the responses and the abort notifications.
function OnAbortResourceRequest
virtual void OnAbortResourceRequest(
uint id
)
Called when a requested resource is not needed anymore.
Parameters:
- id the id associated with the resource request
Reimplemented by: cohtml.DefaultResourceHandler.OnAbortResourceRequest
Note: The client is required to call IAsyncResourceResponse.Finish on the resource response object with the associated request.
function SwigDelegateResourceHandler_0
delegate void SwigDelegateResourceHandler_0(
global.System.IntPtr request,
global.System.IntPtr response,
global.System.IntPtr swigId
)
function SwigDelegateResourceHandler_1
delegate void SwigDelegateResourceHandler_1(
uint id,
global.System.IntPtr swigId
)
Protected Functions Documentation
function ResourceHandler
ResourceHandler()
Protected Attributes Documentation
variable swigCMemOwn
bool swigCMemOwn;