public override void Flush() { if (RecordStream != null) { RecordStream.Flush(); } }
public void Flush() { if (Writer != null) { Writer.Flush(); } if (RecordStream != null) { RecordStream.Flush(); } }
public override int Read(byte[] buffer, int offset, int count) { int bytesRead = InputStream.Read(buffer, offset, count); if (RecordStream != null) { RecordStream.Write(buffer, offset, bytesRead); RecordStream.Flush(); } return(bytesRead); }
private void ProcessSendFatalAlert(Alert alert) { try { // Create and encrypt the alert record Record record = new Record(RecordType.Alert, _handshakeSession.NegotiatedVersion, alert.GetBytes()); _recordHandler.ProcessOutputRecord(record); // Attempt sending the alert record _recordStream.Send(new Record[] { record }); _recordStream.Flush(); _recordStream.Close(); } catch (Exception) {} }
public int AddOrGet(string tag) { int key; lock (_lock) if (!_tags.TryGetValue(tag, out key)) { var id = NextTagId(); _tags.Add(tag, key = id); _strings.Add(id, tag); _file.Write(new TagStorageClass { Tag = tag }); _file.Flush(); } return(key); }
public int AddOrGet(IEnumerable <int> tagsIn) { var tags = tagsIn.ToArray(); lock (_lock) { int id; var item = _paths.FirstOrDefault(p => StructuralComparisons.StructuralEqualityComparer.Equals(p.Key, tags)); if (item.Key == null) { id = GetNextPathId(); _paths[tags] = id; _pathLookup[id] = tags; _file.Write(new PathStorageClass { Tags = tags }); _file.Flush(); return(id); } return(item.Value); } }
protected internal virtual void Flush() { mRecordStream.Flush(); }