Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunSimple ¶
func RunSimple(ctx context.Context, s *Server, pc net.PacketConn, family udp.AddrFamily) error
Types ¶
type AnnounceTracker ¶
type AnnounceTracker = trackerServer.AnnounceTracker
type ConnectionTracker ¶
type ConnectionTracker interface { Add(ctx context.Context, addr ConnectionTrackerAddr, id udp.ConnectionId) error Check(ctx context.Context, addr ConnectionTrackerAddr, id udp.ConnectionId) (bool, error) }
type ConnectionTrackerAddr ¶
type ConnectionTrackerAddr = string
type RequestSourceAddr ¶
type Server ¶
type Server struct { ConnTracker ConnectionTracker SendResponse func(ctx context.Context, data []byte, addr net.Addr) (int, error) Announce *trackerServer.AnnounceHandler }
func (*Server) HandleRequest ¶
func (me *Server) HandleRequest( ctx context.Context, family udp.AddrFamily, source RequestSourceAddr, body []byte, ) (err error)
Click to show internal directories.
Click to hide internal directories.