putItem

suspend fun putItem(item: DhtItem): Int

Store a BEP-44 item in the DHT. This is the client port of node::put_item. It runs a get→(optional cas)→put: a getItem traversal locates the closest nodes and their write tokens, then a put is fired to each. For a mutable item, the discovered highest stored sequence number is supplied as cas so a concurrent writer can't be silently clobbered (libtorrent's compare-and-swap). Returns the number of nodes the put was accepted by (a non-error reply).