X-Git-Url: https://bearssl.org/gitweb//home/git/?p=BoarSSL;a=blobdiff_plain;f=IO%2FMergeStream.cs;fp=Twrch%2FMergeStream.cs;h=d233af28708b6a6672a3d8b2b6c718206067a1ff;hp=4a5ac29adeef0795dc4d99589628aec9d5767faa;hb=c16004e3afb8aa2524aeec88aa7c9c67400e93c1;hpb=a3526e62c383183a1ba5572a3af40912431121fc diff --git a/Twrch/MergeStream.cs b/IO/MergeStream.cs similarity index 88% rename from Twrch/MergeStream.cs rename to IO/MergeStream.cs index 4a5ac29..d233af2 100644 --- a/Twrch/MergeStream.cs +++ b/IO/MergeStream.cs @@ -25,6 +25,8 @@ using System; using System.IO; +namespace IO { + /* * This class merges two underlying streams (one for reading, the other * for writing) into a single Stream object. It can also optionally dump @@ -32,15 +34,25 @@ using System.IO; * stream (for debugging purposes). */ -internal class MergeStream : Stream { +public class MergeStream : Stream { Stream subIn, subOut; - internal TextWriter Debug { + /* + * Text stream on which to write an hexadecimal dump of the data + * which is read from or written to this stream. If null (the + * default), then no dump is written. + */ + public TextWriter Debug { get; set; } - internal MergeStream(Stream subIn, Stream subOut) + /* + * Create this stream over the two underlying substreams: + * 'subIn', from which data is read, and 'subOut', to which data + * is written. The two substreams may be the same object. + */ + public MergeStream(Stream subIn, Stream subOut) { this.subIn = subIn; this.subOut = subOut; @@ -182,3 +194,5 @@ internal class MergeStream : Stream { } } } + +}