public GenericCommandTransaction(PopConnection connection, string command, bool isResponseMultiline)
            : base(connection)
        {
            IsResponseMultiline = isResponseMultiline;

              this.command = command;
        }
Example #2
0
        public StlsTransaction(PopConnection connection, UpgradeConnectionStreamCallback createAuthenticatedStreamCallback)
            : base(connection)
        {
            if (createAuthenticatedStreamCallback == null)
            throw new ArgumentNullException("createAuthenticatedStreamCallback");

              this.createAuthenticatedStreamCallback = createAuthenticatedStreamCallback;
        }
Example #3
0
        public AuthTransaction(PopConnection connection, SaslClientMechanism authMechanism)
            : base(connection)
        {
            if (authMechanism == null)
            throw new ArgumentNullException("authMechanism");

              this.saslMechanism = authMechanism;
              this.requiredCapability = null; // do not check capability
              this.disposeMechanism = false;
        }
Example #4
0
        public AuthTransaction(PopConnection connection, NetworkCredential credential)
            : base(connection)
        {
            if (credential == null)
            throw new ArgumentNullException("credential");

              this.credential = credential;
              this.requiredCapability = PopCapability.Sasl;
              this.disposeMechanism = true;
        }
Example #5
0
 public DeleTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #6
0
 public NoOpTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #7
0
 public UserTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #8
0
 public ApopTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #9
0
        /*
         * transaction methods : connect/disconnect
         */
        private void Connect(string host, int port, UpgradeConnectionStreamCallback createAuthenticatedStreamCallback)
        {
            TraceInfo("connecting");

              this.connection = new PopConnection(host, port, createAuthenticatedStreamCallback);

              TraceInfo("connected");

              using (var t = new GreetingTransaction(connection)) {
            try {
              if (ProcessTransaction(t).Failed)
            throw new PopConnectionException(string.Concat("connection refused or establishment failed: ", t.Result.ResultText));
            }
            catch (TimeoutException ex) {
              throw new PopConnectionException("connection timed out", ex);
            }

            timestamp = t.Result.Value;

            TransitStateTo(PopSessionState.Authorization);
              }

              if (ApopAvailable)
            TraceInfo("APOP is available, timestamp is {0}", timestamp);
        }
Example #10
0
        private void CloseConnection()
        {
            if (connection == null)
            return;

              try {
            TraceInfo("disconnecting");

            connection.Close();

            TraceInfo("disconnected");
              }
              finally {
            TransitStateTo(PopSessionState.NotConnected);

            connection = null;
              }
        }
 public SendCommandTransactionBase(PopConnection connection)
     : base(connection)
 {
 }
Example #12
0
 public RetrTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #13
0
 public PassTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #14
0
 public RsetTransaction(PopConnection connection)
     : base(connection)
 {
 }
Example #15
0
 public QuitTransaction(PopConnection connection)
     : base(connection)
 {
 }