From Matthew's email
I might also suggest changing the boundary between what you've called "Protocol" and "Connection". Right now, the Protocol class deals with reconstructing bytes from the stream and also writes raw bytes to the transport. It seems like it would be better to have the framing and encoding/decoding handled by the "network" layer, then you can layer the RPC protocol on top of that, namely the contents of the messages, matching requests and responses, etc.