Esempio n. 1
0
 public void OnClientFailed(V8DebugClient client)
 {
     if (Interlocked.CompareExchange(ref activeClient, null, client) == client)
     {
         listener.DisconnectClient();
     }
 }
Esempio n. 2
0
 public void SendCommand(V8DebugClient client, string command)
 {
     if (client == activeClient)
     {
         listener.SendCommand(command);
     }
 }
Esempio n. 3
0
        private bool ConnectClient(WebSocket webSocket)
        {
            var client = new V8DebugClient(this, webSocket);

            if (Interlocked.CompareExchange(ref activeClient, client, null) == null)
            {
                listener.ConnectClient();
                client.Start();
                return(true);
            }

            return(false);
        }
Esempio n. 4
0
        private bool ConnectClient(WebSocket webSocket)
        {
            // ReSharper disable ConditionIsAlwaysTrueOrFalse
            // ReSharper disable HeuristicUnreachableCode

            var client = new V8DebugClient(this, webSocket);

            if (Interlocked.CompareExchange(ref activeClient, client, null) == null)
            {
                listener.ConnectClient();
                client.Start();
                return(true);
            }

            return(false);

            // ReSharper restore HeuristicUnreachableCode
            // ReSharper restore ConditionIsAlwaysTrueOrFalse
        }