In protocol.go the Propose
protobuf is writen using a function called writeMsgCtx
. This method accepts a w msgio.Writer
func writeMsgCtx(ctx context.Context, w msgio.Writer, msg proto.Message) ([]byte, error)
The msgio.Writer
passed into writeMsgCtx
is the s.insecureM
writer which is set in the newSecureSession
function. s.insecureM
is created from a insecure io.ReadWriteCloser
. This however, is already a msgio ReadWrite.
- newSecureSession is called from
NewSession
in interface.go