Ejemplo n.º 1
0
 /// <summary>
 /// The on server created.
 /// </summary>
 /// <param name="server">
 /// The server.
 /// </param>
 protected override void OnServerCreated(CefServer server)
 {
     if (mServer == null)
     {
         ConnectionNameMapper.Clear();
         mServer = server;
         IoC.RegisterInstance(typeof(CefServer), typeof(CefServer).FullName, mServer);
         IsServerRunning = server.IsRunning;
         RunCompleteCallback(server.IsRunning);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// The on web socket request.
        /// </summary>
        /// <param name="server">
        /// The server.
        /// </param>
        /// <param name="connectionId">
        /// The connection id.
        /// </param>
        /// <param name="clientAddress">
        /// The client address.
        /// </param>
        /// <param name="request">
        /// The request.
        /// </param>
        /// <param name="callback">
        /// The callback.
        /// </param>
        protected override void OnWebSocketRequest(
            CefServer server,
            int connectionId,
            string clientAddress,
            CefRequest request,
            CefCallback callback)
        {
            // Cache name and connection identifier.
            ConnectionNameMapper.Add(request.Url, connectionId);

            // Always accept WebSocket connections.
            callback.Continue();
        }