6 "github.com/anacrolix/torrent/util"
9 // The unmarshalled KRPC dict message.
11 Q string `bencode:"q,omitempty"`
13 ID string `bencode:"id"`
14 InfoHash string `bencode:"info_hash"`
15 Target string `bencode:"target"`
16 } `bencode:"a,omitempty"`
17 T string `bencode:"t"`
18 Y string `bencode:"y"`
19 R *Return `bencode:"r,omitempty"`
20 E *KRPCError `bencode:"e,omitempty"`
24 ID string `bencode:"id"`
25 Nodes CompactIPv4NodeInfo `bencode:"nodes,omitempty"`
26 Token string `bencode:"token"`
27 Values []util.CompactPeer `bencode:"values,omitempty"`
30 var _ fmt.Stringer = Msg{}
32 func (m Msg) String() string {
33 return fmt.Sprintf("%#v", m)
36 // The node ID of the source of this Msg.
37 func (m Msg) SenderID() string {
47 func (m Msg) Error() *KRPCError {