]> git.deb.at Git - rhonda/impostor.hazel.git/commitdiff
Add the ability to start a MessageWriter in the middle of a MessageReader
authorForest <forest@innersloth.com>
Tue, 15 Dec 2020 01:03:54 +0000 (17:03 -0800)
committerForest <forest@innersloth.com>
Tue, 15 Dec 2020 01:03:54 +0000 (17:03 -0800)
Hazel/MessageReader.cs

index 39ed20cf0caa546c8a88d54c9ff490e234baca76..4e3b24e6398e0e08e190ae9d588438bbf1036ec7 100644 (file)
@@ -164,6 +164,13 @@ namespace Hazel
             return output;
         }
 
+        public MessageWriter StartWriter()
+        {
+            var output = new MessageWriter(this.Buffer);
+            output.Position = this.readHead;
+            return output;
+        }
+
         public void RemoveMessage(MessageReader reader)
         {
             var temp = MessageReader.GetSized(reader.Buffer.Length);