public AnnouncePeer(NodeId id, NodeId infoHash, BEncodedNumber port, BEncodedValue token) : base(id, QueryName) { Parameters.Add(InfoHashKey, BEncodedString.FromMemory(infoHash.AsMemory())); Parameters.Add(PortKey, port); Parameters.Add(TokenKey, token); }
protected ResponseMessage(NodeId id, BEncodedValue transactionId) : base(ResponseType) { properties.Add(ReturnValuesKey, new BEncodedDictionary()); Parameters.Add(IdKey, BEncodedString.FromMemory(id.AsMemory())); TransactionId = transactionId; }
protected QueryMessage(NodeId id, BEncodedString queryName, BEncodedDictionary queryArguments) : base(QueryType) { properties.Add(QueryNameKey, queryName); properties.Add(QueryArgumentsKey, queryArguments); Parameters.Add(IdKey, BEncodedString.FromMemory(id.AsMemory())); }
public FindNode(NodeId id, NodeId target) : base(id, QueryName) { Parameters.Add(TargetKey, BEncodedString.FromMemory(target.AsMemory())); }
public GetPeers(NodeId id, NodeId infohash) : base(id, QueryName) { Parameters.Add(InfoHashKey, BEncodedString.FromMemory(infohash.AsMemory())); }