Skip to content

Allow net.PacketConn parameter #7

@mrmelon54

Description

@mrmelon54

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions