Esempio n. 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 protected ResponseBase(NodeId id, BEncodedValue transactionId)
     : base(_responseType)
 {
     Properties.Add(_returnValuesKey, new BEncodedDictionary());
     ReturnValues.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
Esempio n. 4
0
 protected ResponseMessage(NodeId id, BEncodedValue transactionId)
     : base(ResponseType)
 {
     properties.Add(ReturnValuesKey, new BEncodedDictionary());
     Parameters.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
Esempio n. 5
0
		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);
		}
Esempio n. 6
0
 protected ResponseMessage(NodeId id, BEncodedValue transactionId)
     : base(ResponseType)
 {
     Properties.Add(ReturnValuesKey, new BEncodedDictionary());
     Parameters.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
Esempio n. 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());
        }
Esempio n. 8
0
        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;
        }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 11
0
 public GetPeers(NodeId id, NodeId infohash)
     : base(id, QueryName, responseCreator)
 {
     Parameters.Add(InfoHashKey, infohash.BencodedString());
 }
Esempio n. 12
0
		public GetPeers(NodeId id, NodeId infohash)
			: base(id, QueryName, responseCreator)
		{
			Parameters.Add(InfoHashKey, infohash.BencodedString());
		}
Esempio n. 13
0
 public FindNode(NodeId id, NodeId target)
     : base(id, QueryName)
 {
     Parameters.Add(TargetKey, target.BencodedString());
 }
Esempio n. 14
0
		public FindNode(NodeId id, NodeId target)
			: base(id, QueryName, responseCreator)
		{
			Parameters.Add(TargetKey, target.BencodedString());
		}
Esempio n. 15
0
 public FindNode(NodeId id, NodeId target)
     : base(id, QueryName, InternalResponseCreator)
 {
     Parameters.Add(TargetKey, target.BencodedString());
 }
Esempio n. 16
0
 public GetPeers(NodeId id, NodeId infohash)
     : base(id, _queryName, _responseCreator)
 {
     Arguments.Add(_infoHashKey, infohash.BencodedString());
 }
Esempio n. 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));
 }
Esempio n. 18
0
 public FindNode(NodeId id, NodeId target)
     : base(id, _queryName, _responseCreator)
 {
     Arguments.Add(_targetKey, target.BencodedString());
 }