cohtml.Net.ResourceHandler
Class that will handle all asynchronous resource requests.
Inherits from SystemIDisposable
Inherited by cohtml.DefaultResourceHandler
Public Functions
Section titled “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
Section titled “Protected Functions”| Name | |
|---|---|
| ResourceHandler() |
Protected Attributes
Section titled “Protected Attributes”| Name | |
|---|---|
| bool | swigCMemOwn |
Public Functions Documentation
Section titled “Public Functions Documentation”function Dispose
Section titled “function Dispose”virtual void Dispose()Reimplemented by: cohtml.DefaultResourceHandler.Dispose
function OnResourceRequest
Section titled “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
Section titled “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
Section titled “function SwigDelegateResourceHandler_0”delegate void SwigDelegateResourceHandler_0( global.System.IntPtr request, global.System.IntPtr response, global.System.IntPtr swigId)function SwigDelegateResourceHandler_1
Section titled “function SwigDelegateResourceHandler_1”delegate void SwigDelegateResourceHandler_1( uint id, global.System.IntPtr swigId)Protected Functions Documentation
Section titled “Protected Functions Documentation”function ResourceHandler
Section titled “function ResourceHandler”ResourceHandler()Protected Attributes Documentation
Section titled “Protected Attributes Documentation”variable swigCMemOwn
Section titled “variable swigCMemOwn”bool swigCMemOwn;© 2026 Coherent Labs. All rights reserved.