private static unsafe void OnWebSocketConnectedImpl(cef_server_handler_t *self, cef_server_t *server, int connection_id) { var instance = GetInstance((IntPtr)self) as CefServerHandler; if (instance == null || ((ICefServerHandlerPrivate)instance).AvoidOnWebSocketConnected()) { ReleaseIfNonNull((cef_base_ref_counted_t *)server); return; } instance.OnWebSocketConnected(CefServer.Wrap(CefServer.Create, server), connection_id); }
private static unsafe void OnWebSocketMessageImpl(cef_server_handler_t *self, cef_server_t *server, int connection_id, void *data, UIntPtr data_size) { var instance = GetInstance((IntPtr)self) as CefServerHandler; if (instance == null || ((ICefServerHandlerPrivate)instance).AvoidOnWebSocketMessage()) { ReleaseIfNonNull((cef_base_ref_counted_t *)server); return; } instance.OnWebSocketMessage(CefServer.Wrap(CefServer.Create, server), connection_id, unchecked ((IntPtr)data), (long)data_size); }
private static unsafe void OnHttpRequestImpl(cef_server_handler_t *self, cef_server_t *server, int connection_id, cef_string_t *client_address, cef_request_t *request) { var instance = GetInstance((IntPtr)self) as CefServerHandler; if (instance == null || ((ICefServerHandlerPrivate)instance).AvoidOnHttpRequest()) { ReleaseIfNonNull((cef_base_ref_counted_t *)server); ReleaseIfNonNull((cef_base_ref_counted_t *)request); return; } instance.OnHttpRequest(CefServer.Wrap(CefServer.Create, server), connection_id, CefString.Read(client_address), CefRequest.Wrap(CefRequest.Create, request)); }