func (c *UDPClient) Connect() error {
	c.t.Go(func() error {
		return c.runRequestQueue()
	})
	udp, err := net.DialTimeout("udp", c.addr, c.timeout)
	if err != nil {
		return err
	}
	c.conn = udp
	return nil
}
Connect the udp client
package riemanngo
import (
	"fmt"
	"net"
	"time"
	pb "github.com/golang/protobuf/proto"
	"github.com/riemann/riemann-go-client/proto"
	"gopkg.in/tomb.v2"
)
type UDPClient struct {
	addr         string
	conn         net.Conn
	requestQueue chan request
	timeout      time.Duration
	t            tomb.Tomb
}
const MaxUDPSize = 16384
func NewUDPClient(addr string, timeout time.Duration) *UDPClient {
	t := &UDPClient{
		addr:         addr,
		requestQueue: make(chan request),
		timeout:      timeout,
	}
	return t
}