コード例 #1
0
        public ConnectionManager(Connection connection)
        {
            PendingMessages = new Queue <MessageAndCallback>();
            AttemptsInfo    = new ConnectionAttemptsInfo(connection);
            Connection      = connection;
            AckProcessor    = new AcknowledgementProcessor(connection);


            if (Logger.IsDebug)
            {
                Execute(() => Logger.Debug("ConnectionManager thread created"));
            }
        }
コード例 #2
0
        public ConnectionManager(Connection connection, Func <DateTimeOffset> nowFunc, ILogger logger)
        {
            Now             = nowFunc;
            Logger          = logger ?? DefaultLogger.LoggerInstance;
            PendingMessages = new Queue <MessageAndCallback>();
            AttemptsInfo    = new ConnectionAttemptsInfo(connection, nowFunc);
            Connection      = connection;
            AckProcessor    = new AcknowledgementProcessor(connection);

            if (Logger.IsDebug)
            {
                Execute(() => Logger.Debug("ConnectionManager thread created"));
            }
        }