public CrcConnection(Connection connection, BufferManager bufferManager) { _connection = connection; _bufferManager = bufferManager; _connect = true; }
public CompressConnection(Connection connection, int maxReceiveCount, BufferManager bufferManager) { _connection = connection; _maxReceiveCount = maxReceiveCount; _bufferManager = bufferManager; _myCompressAlgorithm = CompressAlgorithm.Deflate; }
public SecureConnection(SecureConnectionVersion version, SecureConnectionType type, Connection connection, DigitalSignature digitalSignature, BufferManager bufferManager) { _type = type; _connection = connection; _digitalSignature = digitalSignature; _bufferManager = bufferManager; _myVersion = version; }
public override void Close(TimeSpan timeout, Information options) { if (_disposed) throw new ObjectDisposedException(this.GetType().FullName); if (!_connect) throw new ConnectionException(); lock (this.ThisLock) { if (_connection != null) { try { _connection.Close(timeout); } catch (Exception) { } _connection = null; } _connect = false; } }
protected override void Dispose(bool disposing) { if (_disposed) return; _disposed = true; if (disposing) { if (_connection != null) { try { _connection.Dispose(); } catch (Exception) { } _connection = null; } _connect = false; } }