about summary refs log tree commit diff stats
path: root/src/io/bufwriter.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/bufwriter.nim')
-rw-r--r--src/io/bufwriter.nim10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/io/bufwriter.nim b/src/io/bufwriter.nim
index cbee8b5b..75da4190 100644
--- a/src/io/bufwriter.nim
+++ b/src/io/bufwriter.nim
@@ -1,4 +1,5 @@
-# Write data to streams.
+# Write data to streams in packets.
+# Each packet is prefixed with its length as a pointer-sized integer.
 
 import std/options
 import std/sets
@@ -53,13 +54,6 @@ proc deinit*(writer: var BufferedWriter) =
   writer.bufSize = 0
   writer.bufLen = 0
 
-template withWriter*(stream: DynStream; w, body: untyped) =
-  block:
-    var w = stream.initWriter()
-    body
-    w.flush()
-    w.deinit()
-
 template withPacketWriter*(stream: DynStream; w, body: untyped) =
   block:
     var w = stream.initWriter(writeLen = true)