Would be nice to accept a net.PacketConn parameter as well as addr string (see examples below).
|
func (s *Server) ListenAndServe(addr string) error { |
func (s *Server) ListenAndServe(conn net.PacketConn) error {
I use cloudflare/tableflip and this addition would enable usage of the tableflip supported UDP listener.
ListenPacket: https://github.com/cloudflare/tableflip/blob/b3a0d54308fba327fb463cc1a3c11d3607deea53/fds.go#L201-L204
Would be nice to accept a
net.PacketConnparameter as well asaddr string(see examples below).fastdns/server.go
Line 37 in 52d1cc6
I use cloudflare/tableflip and this addition would enable usage of the tableflip supported UDP listener.
ListenPacket: https://github.com/cloudflare/tableflip/blob/b3a0d54308fba327fb463cc1a3c11d3607deea53/fds.go#L201-L204