/// <summary>
        /// Connects the client to the broker's remote servers
        /// </summary>
        public override void Connect()
        {
            // Register to the event session to receive events.
            StartTransactionStream();

            _isConnected = true;

            TransactionsConnectionHandler.EnableMonitoring(true);
        }
        /// <summary>
        /// Disconnects the client from the broker's remote servers
        /// </summary>
        public override void Disconnect()
        {
            TransactionsConnectionHandler.EnableMonitoring(false);
            PricingConnectionHandler.EnableMonitoring(false);

            StopTransactionStream();
            StopPricingStream();

            _isConnected = false;
        }
示例#3
0
        /// <summary>
        /// Creates wss connection, monitors for disconnection and re-connects when necessary
        /// </summary>
        public override void Connect()
        {
            if (IsConnected)
            {
                return;
            }

            Log.Trace("BaseWebSocketsBrokerage.Connect(): Connecting...");

            ConnectSync();
            _connectionHandler.EnableMonitoring(true);
        }
示例#4
0
 /// <summary>
 /// Disconnects the client from the broker's remote servers
 /// </summary>
 public override void Disconnect()
 {
     _connectionHandler?.EnableMonitoring(false);
 }