public GenericCommandTransaction(PopConnection connection, string command, bool isResponseMultiline) : base(connection) { IsResponseMultiline = isResponseMultiline; this.command = command; }
public StlsTransaction(PopConnection connection, UpgradeConnectionStreamCallback createAuthenticatedStreamCallback) : base(connection) { if (createAuthenticatedStreamCallback == null) throw new ArgumentNullException("createAuthenticatedStreamCallback"); this.createAuthenticatedStreamCallback = createAuthenticatedStreamCallback; }
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; }
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; }
public DeleTransaction(PopConnection connection) : base(connection) { }
public NoOpTransaction(PopConnection connection) : base(connection) { }
public UserTransaction(PopConnection connection) : base(connection) { }
public ApopTransaction(PopConnection connection) : base(connection) { }
/* * 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); }
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) { }
public RetrTransaction(PopConnection connection) : base(connection) { }
public PassTransaction(PopConnection connection) : base(connection) { }
public RsetTransaction(PopConnection connection) : base(connection) { }
public QuitTransaction(PopConnection connection) : base(connection) { }