Skip to content
SiteEmail

cohtml.Net.ResourceHandler

Class that will handle all asynchronous resource requests.

Inherits from SystemIDisposable

Inherited by cohtml.DefaultResourceHandler

Name
virtual voidDispose()
virtual voidOnResourceRequest(ResourceRequest request, ResourceResponse response)
Called when Cohtml needs a resource.
virtual voidOnAbortResourceRequest(uint id)
Called when a requested resource is not needed anymore.
delegate voidSwigDelegateResourceHandler_0(global.System.IntPtr request, global.System.IntPtr response, global.System.IntPtr swigId)
delegate voidSwigDelegateResourceHandler_1(uint id, global.System.IntPtr swigId)
Name
ResourceHandler()
Name
boolswigCMemOwn
virtual void Dispose()

Reimplemented by: cohtml.DefaultResourceHandler.Dispose

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.

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.

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
)
ResourceHandler()
bool swigCMemOwn;