code: func (r *Packet) Reply(payload interface{}, err error) ([]byte, error) {
  	p := new(Packet)
  
  	status := uint32(StatusSuccess)
  
  	if err != nil {
  		status = errorStatus(err)
  	} else {
  		p.Payload, err = MarshalBinary(payload)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	p.Header = Header{
  		Version:     HeaderVersion,
  		Dummy:       OpNewHeader,
  		PacketSize:  headerSize + uint32(len(p.Payload)),
  		HeaderSize:  headerSize,
  		RequestID:   r.RequestID,
  		Op:          r.Op,
  		Status:      status,
  		Flags:       PacketFlagReply,
  		Information: 0,
  		SessionID:   r.SessionID,
  	}
  
  	if Trace {
  		rc := "OK"
  		if err != nil {
  			rc = err.Error()
  		}
  		fmt.Fprintf(os.Stderr, "[hgfs] response %#v [%s]\n", p.Header, rc)
  	} else if err != nil {
  		log.Printf("[hgfs] op=%d error: %s", r.Op, err)
  	}
  
  	return p.MarshalBinary()
  }
docs: // Reply composes a new Packet with the given payload or error