From 61fd3f733326bda553a065dfd9bea7669c53f86e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 9 Dec 2013 14:29:28 -0800 Subject: [PATCH] packer/rpc: update docs --- packer/rpc/muxconn.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packer/rpc/muxconn.go b/packer/rpc/muxconn.go index cf296be04..ee34b515f 100644 --- a/packer/rpc/muxconn.go +++ b/packer/rpc/muxconn.go @@ -14,11 +14,9 @@ import ( // to actually act as a server as well. // // MuxConn works using a fairly dumb multiplexing technique of simply -// prefixing each message with what stream it is on along with the length -// of the data. -// -// This can likely be abstracted to N streams, but by choosing only two -// we decided to cut a lot of corners and make this easily usable for Packer. +// framing every piece of data sent into a prefix + data format. Streams +// are established using a subset of the TCP protocol. Only a subset is +// necessary since we assume ordering on the underlying RWC. type MuxConn struct { rwc io.ReadWriteCloser streams map[byte]*Stream