code wiki / (root) / nx_tracker.nx

nx_tracker.nx

buildroot/runtime/nx_tracker.nx

4094 B108 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind librarytopic tracker
docsdependenciesstructsconstsfunctions

about

nx_tracker.nx -- BitTorrent HTTP tracker announce (bits-up), reuses the net primitives. module: nishi-core.torrent.tracker depends: nx_str.nx, nx_syscalls.nx, nx_bencode.nx capability: CORE_COMPUTE wired_status: FULLY_WIRED Build the announce request (%-encoded info_hash + peer_id + numeric params, BEP-3) and parse the compact peer list (BEP-23: peers = 6N bytes, 4 IP + 2 port BE). The LIVE announce reuses nx_http_get_ua (the crawler's UA HTTP GET) + nx_net_governor (ISP-safe pacing) + DNS/TLS -- the reusability payoff: the torrent client's tracker step IS the search engine's net stack. Pure builder + parser here (KAT'd); the socket round-trip is the shared primitive.

dependencies 3 imports · 1 importers

nx_str.nx nx_syscalls.nx nx_bencode.nx nx_tracker.nx nx_tracker_test.nx

imports: nx_str.nxnx_syscalls.nxnx_bencode.nx

imported by: nx_tracker_test.nx

structs

none

consts

none

functions

20func _trk_hex(nib: i64) -> i64
called by 1: nx_trk_pct_encode
25func _trk_unreserved(c: i64) -> i64
called by 1: nx_trk_pct_encode
36func nx_trk_pct_encode(bytes: *u8, n: i64, out: *u8) -> i64
51func _trk_lit(out: *u8, o: i64, s: *u8) -> i64
called by 1: nx_tracker_build_path calls 1: nx_str_len
56func _trk_dec(out: *u8, o: i64, v: i64) -> i64
called by 1: nx_tracker_build_path calls 1: sys_mmap
67func nx_tracker_build_path(announce_path: *u8, aplen: i64,
88func nx_tracker_parse_peers(resp: *u8, n: i64, out_ips: *i64, out_ports: *i64, max: i64) -> i64