code: func readWriteMsg(c msgio.ReadWriter, out []byte) ([]byte, error) {
  	wresult := make(chan error)
  	go func() {
  		wresult <- c.WriteMsg(out)
  	}()
  
  	msg, err1 := c.ReadMsg()
  
  	// Always wait for the read to finish.
  	err2 := <-wresult
  
  	if err1 != nil {
  		return nil, err1
  	}
  	if err2 != nil {
  		c.ReleaseMsg(msg)
  		return nil, err2
  	}
  	return msg, nil
  }
docs: // read and write a message at the same time.