announce

suspend fun announce(host: String, port: Int, req: AnnounceRequest): AnnounceResponse

Announce to the UDP tracker at host:port, performing the BEP-15 connect→announce two-step (reusing a cached connection id when one is still valid), and return the parsed AnnounceResponse.

Mirrors udp_tracker_connection::start_announcesend_udp_announceon_announce_response.

Throws

if the tracker returns a BEP-15 error packet, or if no valid response arrives within maxAttempts attempts.