Exemplo n.º 1
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);
        }
Exemplo n.º 2
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
        }