public void GetPeersEncode() { GetPeers m = new GetPeers(id, infohash); m.TransactionId = transactionId; Compare(m, "d1:ad2:id20:abcdefghij01234567899:info_hash20:mnopqrstuvwxyz123456e1:q9:get_peers1:t2:aa1:y1:qe"); message = m; }
private void SendGetPeers(Node n) { NodeId distance = n.Id.Xor(infoHash); queriedNodes.Add(distance, n); activeQueries++; GetPeers m = new GetPeers(engine.LocalId, infoHash); SendQueryTask task = new SendQueryTask(engine, m, n); task.Completed += GetPeersCompleted; task.Execute(); }
private void SendGetPeers(Node n) { var distance = n.Id.Xor(infoHash); ClosestActiveNodes.Add(distance, n); activeQueries++; var m = new GetPeers(engine.LocalId, infoHash); var task = new SendQueryTask(engine, m, n); task.Completed += GetPeersCompleted; task.Execute(); }