func (m *Message) ExchangeBuf(conn net.Conn, rxbuf []byte) (n int, reply *Message, err error) {
	w := dns.NewWirebuf()
	m.Encode(w)
	return ExchangeWire(conn, w.Buf, rxbuf)
}
// ExchangeBuf exchanges m through conn and returns a reply or an Error if any.
// ExchangeBuf uses rxbuf for receiving the reply. ExchangeBuf can hang forever
// if the conn doesn't have appropriate read and/or write timeouts already set.
// Returned n reflects the number of bytes revecied to rxbuf.
ExchangeBuf exchanges m through conn and returns a reply or an Error if any.
ExchangeBuf uses rxbuf for receiving the reply. ExchangeBuf can hang forever
if the conn doesn't have appropriate read and/or write timeouts already set.
Returned n reflects the number of bytes revecied to rxbuf.
// ExchangeBuf exchanges m through conn and returns a reply or an Error if any . // ExchangeBuf uses rxbuf for receiving the reply . ExchangeBuf can hang forever // if the conn doesn ' t have appropriate read and / or write timeouts already set . // Returned n reflects the number of bytes revecied to rxbuf .
func (m *Message) ExchangeBuf(conn net.Conn, rxbuf []byte) (n int, reply *Message, err error) {
	w := dns.NewWirebuf()
	m.Encode(w)
	return ExchangeWire(conn, w.Buf, rxbuf)
}
func ( m * Message ) ExchangeBuf ( conn net . Conn , rxbuf [ ] byte ) ( n int , reply * Message , err error ) { w := dns . NewWirebuf ( ) m . Encode ( w ) return ExchangeWire ( conn , w . Buf , rxbuf ) }
ExchangeBuf exchanges m through conn and returns a reply or an Error if any.
ExchangeBuf exchanges m through conn and returns a reply or an Error if any .