return c.cl.Close()
}
-func (c *udpClient) Announce(ctx context.Context, req AnnounceRequest, opts trHttp.AnnounceOpt) (res AnnounceResponse, err error) {
+func (c *udpClient) Announce(
+ ctx context.Context,
+ req AnnounceRequest,
+ opts trHttp.AnnounceOpt,
+) (res AnnounceResponse, err error) {
if req.IPAddress == 0 && opts.ClientIp4 != nil {
// I think we're taking bytes in big-endian order (all IPs), and writing it to a natively
// ordered uint32. This will be correctly ordered when written back out by the UDP client
return
}
-func (cl *Client) requestWriter(ctx context.Context, action Action, body []byte, tId TransactionId) (err error) {
+func (cl *Client) requestWriter(
+ ctx context.Context,
+ action Action,
+ body []byte,
+ tId TransactionId,
+) (err error) {
var buf bytes.Buffer
for n := 0; ; n++ {
err = cl.writeRequest(ctx, action, body, tId, &buf)
return fmt.Sprintf("error response: %#q", me.Message)
}
-func (cl *Client) request(ctx context.Context, action Action, body []byte) (respBody []byte, addr net.Addr, err error) {
+func (cl *Client) request(
+ ctx context.Context,
+ action Action,
+ body []byte,
+) (respBody []byte, addr net.Addr, err error) {
respChan := make(chan DispatchedResponse, 1)
t := cl.Dispatcher.NewTransaction(func(dr DispatchedResponse) {
respChan <- dr