コード例 #1
0
        /// <summary>
        /// Disconnects the client from the broker's remote servers
        /// </summary>
        public override void Disconnect()
        {
            // request and wait for thread to stop
            _cancellationTokenSource.Cancel();
            _connectionMonitorThread?.Join();

            _sockClient.DisconnectAsync().SynchronouslyAwaitTask();
            _natsClient.Close();

            _isConnected = false;
        }
コード例 #2
0
        /// <summary>
        /// Disconnects the client from the broker's remote servers
        /// </summary>
        public override void Disconnect()
        {
            _sockClient.DisconnectAsync().SynchronouslyAwaitTask();

            if (_handlesMarketData)
            {
                _polygonStreamingClient.Disconnect();
            }

            _isConnected = false;
        }
コード例 #3
0
        /// <summary>
        /// Disconnects the client from the broker's remote servers
        /// </summary>
        public override void Disconnect()
        {
            // request and wait for thread to stop
            _cancellationTokenSource.Cancel();
            _connectionMonitorThread?.Join();

            _sockClient.DisconnectAsync().SynchronouslyAwaitTask();

            if (_handlesMarketData)
            {
                _polygonStreamingClient.DisconnectAsync().SynchronouslyAwaitTask();
            }

            _isConnected = false;
        }