Using CefSharp's ResourceHandlerFactory with SignalR/WebSockets
<p>I'm following the instructions in the answer to <a href="https://stackoverflow.com/questions/34624015/using-cefsharp-with-owin-testserver">this question</a>, which shows how to configure CefSharp with a ResourceHandlerFactory to avoid using the standard OS network stack:</p>

<pre><code>var browser = new ChromiumWebBrowser("&lt;html file here&gt;")
{
     ResourceHandlerFactory = myResourceHandlerFactory, //implements IResourceHandlerFactory                
};
</code></pre>

<p>This works well for static files, but I'm unable to handle WebSocket requests from SignalR. The client sends these requests, but they never appear in the <code>GetResourceHandler</code> method of my <code>IResourceHandlerFactory</code>, which accepts all other requests.</p>

<p>How can I handle WebSocket requests from CefSharp in-memory like this?</p>

<p><strong>Edit with solution:</strong> Using amaitland's suggestion, I was able to implement <code>ISchemeHandlerFactory</code> to intercept WebSocket requests. My Cef initialization now looks like this:</p>

<pre><code>var settings = new CefSettings();
settings.RegisterScheme(new CefCustomScheme { SchemeName = "ws", SchemeHandlerFactory = new OwinSchemeHandlerFactory() });
Cef.Initialize(settings);
</code></pre>

<p>...and my OwinSchemeHandlerFactory just implements the Create method that returns an <code>IResourceHandler</code>: </p>

<pre><code>public IResourceHandler Create(IBrowser browser, IFrame frame, string schemeName, IRequest request)
{
    // return myResourceHandlerFactory.GetResourceHandler();
}
</code></pre>