예제 #1
0
        void IConnectionContext.SetState(States.Connection.ConnectionState newState)
        {
            this.state = newState;
            this.state.OnAttachedToContext();

            this.ackProcessor.OnStateChanged(newState);

            this.connection.OnStateChanged(newState.State, newState.Error, newState.RetryIn ?? -1);
        }
예제 #2
0
 internal ConnectionManager(ITransport transport, IAcknowledgementProcessor ackProcessor, States.Connection.ConnectionState initialState)
     : this()
 {
     this.transport          = transport;
     this.transport.Listener = this;
     this.state        = initialState;
     this.ackProcessor = ackProcessor;
     this.connection   = new Connection(this);
 }