code: func (c *udpAnnounce) write(h *RequestHeader, body interface{}, trailer []byte) (err error) {
  	var buf bytes.Buffer
  	err = binary.Write(&buf, binary.BigEndian, h)
  	if err != nil {
  		panic(err)
  	}
  	if body != nil {
  		err = binary.Write(&buf, binary.BigEndian, body)
  		if err != nil {
  			panic(err)
  		}
  	}
  	_, err = buf.Write(trailer)
  	if err != nil {
  		return
  	}
  	n, err := c.socket.Write(buf.Bytes())
  	if err != nil {
  		return
  	}
  	if n != buf.Len() {
  		panic("write should send all or error")
  	}
  	return
  }
docs: // body is the binary serializable request body. trailer is optional data
  // following it, such as for BEP 41.