Exemple #1
0
 public AnnouncePeer(NodeId id, NodeId infoHash, BEncodedNumber port, BEncodedString token)
     : base(id, _queryName, _responseCreator)
 {
     Arguments.Add(_infoHashKey, infoHash.BencodedString());
     Arguments.Add(_portKey, port);
     Arguments.Add(_tokenKey, token);
 }
 public AnnouncePeer(NodeId id, NodeId infoHash, BEncodedNumber port, BEncodedString token)
     : base(id, QueryName, responseCreator)
 {
     Parameters.Add(InfoHashKey, infoHash.BencodedString());
     Parameters.Add(PortKey, port);
     Parameters.Add(TokenKey, token);
 }
Exemple #3
0
 protected ResponseBase(NodeId id, BEncodedValue transactionId)
     : base(_responseType)
 {
     Properties.Add(_returnValuesKey, new BEncodedDictionary());
     ReturnValues.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
Exemple #4
0
 protected ResponseMessage(NodeId id, BEncodedValue transactionId)
     : base(ResponseType)
 {
     properties.Add(ReturnValuesKey, new BEncodedDictionary());
     Parameters.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
		public AnnouncePeer(NodeId id, NodeId infoHash, BEncodedNumber port, BEncodedString token)
			: base(id, QueryName, responseCreator)
		{
			Parameters.Add(InfoHashKey, infoHash.BencodedString());
			Parameters.Add(PortKey, port);
			Parameters.Add(TokenKey, token);
		}
 protected ResponseMessage(NodeId id, BEncodedValue transactionId)
     : base(ResponseType)
 {
     Properties.Add(ReturnValuesKey, new BEncodedDictionary());
     Parameters.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
Exemple #7
0
        protected QueryMessage(NodeId id, BEncodedString queryName, BEncodedDictionary queryArguments)
            : base(QueryType)
        {
            properties.Add(QueryNameKey, queryName);
            properties.Add(QueryArgumentsKey, queryArguments);

            Parameters.Add(IdKey, id.BencodedString());
        }
        protected QueryMessage(NodeId id, BEncodedString queryName, BEncodedDictionary queryArguments, Func <BEncodedDictionary, QueryMessage, ResponseMessage> responseCreator)
            : base(QueryType)
        {
            properties.Add(QueryNameKey, queryName);
            properties.Add(QueryArgumentsKey, queryArguments);

            Parameters.Add(IdKey, id.BencodedString());
            ResponseCreator = responseCreator;
        }
Exemple #9
0
        protected QueryBase(NodeId id, BEncodedString queryName, BEncodedDictionary queryArguments, Func <BEncodedDictionary, QueryBase, DhtMessage> responseCreator)
            : base(QueryType)
        {
            Properties.Add(_queryNameKey, queryName);
            Properties.Add(_queryArgumentsKey, queryArguments);

            Arguments.Add(IdKey, id.BencodedString());
            ResponseCreator = responseCreator;
        }
Exemple #10
0
        protected QueryMessage(NodeId id, BEncodedString queryName, BEncodedDictionary queryArguments, ResponseCreator responseCreator)
            : base(QueryType)
        {
            Properties.Add(QueryNameKey, queryName);
            Properties.Add(QueryArgumentsKey, queryArguments);

            Parameters.Add(IdKey, id.BencodedString());
            ResponseCreator = responseCreator;
        }
Exemple #11
0
 public GetPeers(NodeId id, NodeId infohash)
     : base(id, QueryName, responseCreator)
 {
     Parameters.Add(InfoHashKey, infohash.BencodedString());
 }
Exemple #12
0
		public GetPeers(NodeId id, NodeId infohash)
			: base(id, QueryName, responseCreator)
		{
			Parameters.Add(InfoHashKey, infohash.BencodedString());
		}
Exemple #13
0
 public FindNode(NodeId id, NodeId target)
     : base(id, QueryName)
 {
     Parameters.Add(TargetKey, target.BencodedString());
 }
Exemple #14
0
		public FindNode(NodeId id, NodeId target)
			: base(id, QueryName, responseCreator)
		{
			Parameters.Add(TargetKey, target.BencodedString());
		}
Exemple #15
0
 public FindNode(NodeId id, NodeId target)
     : base(id, QueryName, InternalResponseCreator)
 {
     Parameters.Add(TargetKey, target.BencodedString());
 }
Exemple #16
0
 public GetPeers(NodeId id, NodeId infohash)
     : base(id, _queryName, _responseCreator)
 {
     Arguments.Add(_infoHashKey, infohash.BencodedString());
 }
Exemple #17
0
 public Vote(NodeId id, NodeId target, byte vote)
     : base(id, _voteKey, _responseCreator)
 {
     Arguments.Add(_targetKey, target.BencodedString());
     Arguments.Add(_voteKey, new BEncodedNumber(vote));
 }
Exemple #18
0
 public FindNode(NodeId id, NodeId target)
     : base(id, _queryName, _responseCreator)
 {
     Arguments.Add(_targetKey, target.BencodedString());
 }