buildItemResponse
fun buildItemResponse(transactionId: ByteArray, nodeId: Sha1Hash, token: ByteArray?, item: DhtItem? = null, nodes: List<CompactNode> = emptyList(), nodes6: List<CompactNode> = emptyList(), includeValue: Boolean = true): Entry
Build a get (BEP-44) response: r{id, token, nodes?, nodes6?, [seq, v, k, sig]}. Port of the get branch of incoming_request plus dht_storage::get_mutable_item/get_immutable_item: an immutable item adds only v; a mutable item adds seq always and v/sig/k when filled.
Parameters
item
the stored item to return, or null when only nodes/token apply.
includeValue
for a mutable item, whether to include v/sig/k (libtorrent withholds them when the requester's seq is already current).