Author: alanmc
Date: 2007-05-01 16:16:18 -0400 (Tue, 01 May 2007)
New Revision: 76547

Modified:
   trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs
   trunk/bitsharp/src/MonoTorrent/Client/Encryption/EncryptedSocket.cs
   trunk/bitsharp/src/MonoTorrent/Client/Encryption/IEncryptor.cs
   trunk/bitsharp/src/MonoTorrent/Client/Encryption/NoEncryption.cs
   trunk/bitsharp/src/MonoTorrent/Client/Logger.cs
   trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs
   trunk/bitsharp/src/MonoTorrent/Client/Managers/PieceManager.cs
   trunk/bitsharp/src/MonoTorrent/Client/PeerConnections/PeerConnectionId.cs
   trunk/bitsharp/src/MonoTorrent/Client/PeerList.cs
   trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/EndGamePicker.cs
   trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/PiecePickerBase.cs
   trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/StandardPicker.cs
   trunk/bitsharp/src/MonoTorrent/Collections/PeerConnectionIDCollection.cs
Log:
Flush

Modified: trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs       2007-05-01 
20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs       2007-05-01 
20:16:18 UTC (rev 76547)
@@ -649,7 +649,7 @@
                 {
                     // Maybe this was a Message Stream Encryption handshake. 
Parse it as such.
                     id.Peer.Connection.Encryptor = new 
PeerBEncryption(Torrents, this.settings.MinEncryptionLevel);
-                    id.Peer.Connection.Encryptor.SetPeerConnectionID(id);
+                    id.Peer.Connection.Encryptor.SetPeerId(id);
                     id.Peer.Connection.Encryptor.onEncryptorReady += 
onEncryptorReadyHandler;
                     id.Peer.Connection.Encryptor.onEncryptorIOError += 
onEncryptorIOErrorHandler;
                     id.Peer.Connection.Encryptor.onEncryptorEncryptionError += 
onEncryptorEncryptionErrorHandler;

Modified: trunk/bitsharp/src/MonoTorrent/Client/Encryption/EncryptedSocket.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Encryption/EncryptedSocket.cs 
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/Encryption/EncryptedSocket.cs 
2007-05-01 20:16:18 UTC (rev 76547)
@@ -229,7 +229,7 @@
         /// Sets the PeerConnectionID associated with this connection
         /// </summary>
         /// <param name="id">The PeerConnectionID associated with this 
connection</param>
-        public void SetPeerConnectionID(PeerId id)
+        public void SetPeerId(PeerId id)
         {
             this.id = id;
         }

Modified: trunk/bitsharp/src/MonoTorrent/Client/Encryption/IEncryptor.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Encryption/IEncryptor.cs      
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/Encryption/IEncryptor.cs      
2007-05-01 20:16:18 UTC (rev 76547)
@@ -61,6 +61,6 @@
 
         int GetInitialData(byte[] buffer, int offset, int count);
 
-        void SetPeerConnectionID(PeerId id);
+        void SetPeerId(PeerId id);
     }
 }

Modified: trunk/bitsharp/src/MonoTorrent/Client/Encryption/NoEncryption.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Encryption/NoEncryption.cs    
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/Encryption/NoEncryption.cs    
2007-05-01 20:16:18 UTC (rev 76547)
@@ -92,7 +92,7 @@
             return 0;
         }
 
-        public void SetPeerConnectionID(PeerId id)
+        public void SetPeerId(PeerId id)
         {
             this.id = id;
             return;

Modified: trunk/bitsharp/src/MonoTorrent/Client/Logger.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Logger.cs     2007-05-01 20:15:51 UTC 
(rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/Logger.cs     2007-05-01 20:16:18 UTC 
(rev 76547)
@@ -56,7 +56,7 @@
 
             foreach (KeyValuePair<PeerConnectionID, LinkedList<string>> 
keypair in log)
             {
-                using (FileStream s = new FileStream(@"C:\Logs\" + 
keypair.Key.GetHashCode() + ".txt", FileMode.OpenOrCreate, 
FileAccess.ReadWrite, FileShare.Read))
+                using (FileStream s = new FileStream(@"Logs\" + 
keypair.Key.GetHashCode() + ".txt", FileMode.OpenOrCreate, 
FileAccess.ReadWrite, FileShare.Read))
                 using(StreamWriter output = new StreamWriter(s))
                 {
                     foreach (string str in keypair.Value)

Modified: trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs 
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs 
2007-05-01 20:16:18 UTC (rev 76547)
@@ -180,7 +180,7 @@
                 else
                     encryptor = new PeerAEncryption(manager.Torrent.InfoHash, 
this.settings.MinEncryptionLevel);
 
-                encryptor.SetPeerConnectionID(id);
+                encryptor.SetPeerId(id);
                 encryptor.onEncryptorReady += onEncryptorReadyHandler;
                 encryptor.onEncryptorIOError += onEncryptorIOErrorHandler;
                 encryptor.onEncryptorEncryptionError += 
onEncryptorEncryptionErrorHandler;

Modified: trunk/bitsharp/src/MonoTorrent/Client/Managers/PieceManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Managers/PieceManager.cs      
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/Managers/PieceManager.cs      
2007-05-01 20:16:18 UTC (rev 76547)
@@ -137,7 +137,7 @@
         }
 
 
-        internal RequestMessage PickPiece(PeerId id, 
PeerConnectionIDCollection otherPeers)
+        internal RequestMessage PickPiece(PeerId id, PeerIdCollection 
otherPeers)
         {
                        //if ((this.MyBitField.Length - 
this.MyBitField.TrueCount < 15) && this.piecePicker is StandardPicker)
                        //    this.piecePicker = new 
EndGamePicker(this.MyBitField, id.TorrentManager.Torrent, 
((StandardPicker)this.piecePicker).Requests);

Modified: 
trunk/bitsharp/src/MonoTorrent/Client/PeerConnections/PeerConnectionId.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/PeerConnections/PeerConnectionId.cs   
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/PeerConnections/PeerConnectionId.cs   
2007-05-01 20:16:18 UTC (rev 76547)
@@ -128,7 +128,7 @@
         #endregion
 
 
-        #region IComparable<PeerConnectionID> Members
+        #region IComparable<PeerId> Members
 
         public int CompareTo(PeerId other)
         {

Modified: trunk/bitsharp/src/MonoTorrent/Client/PeerList.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/PeerList.cs   2007-05-01 20:15:51 UTC 
(rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/PeerList.cs   2007-05-01 20:16:18 UTC 
(rev 76547)
@@ -17,11 +17,11 @@
         #region Private Member Variables
 
         private TorrentManager manager;
-        private PeerConnectionIDCollection availablePeers;
-        private PeerConnectionIDCollection connectedPeers;
-        private PeerConnectionIDCollection connectingTo;
-        private PeerConnectionIDCollection downloadQueue;
-        private PeerConnectionIDCollection uploadQueue;
+        private PeerIdCollection availablePeers;
+        private PeerIdCollection connectedPeers;
+        private PeerIdCollection connectingTo;
+        private PeerIdCollection downloadQueue;
+        private PeerIdCollection uploadQueue;
 
         #endregion Private Member Variables
 
@@ -31,7 +31,7 @@
         /// <summary>
         /// The list of peers that are available to be connected to
         /// </summary>
-        internal PeerConnectionIDCollection AvailablePeers
+        internal PeerIdCollection AvailablePeers
         {
             get { return this.availablePeers; }
         }
@@ -39,7 +39,7 @@
         /// <summary>
         /// The list of peers that we are currently connected to
         /// </summary>
-        internal PeerConnectionIDCollection ConnectedPeers
+        internal PeerIdCollection ConnectedPeers
         {
             get { return this.connectedPeers; }
         }
@@ -47,7 +47,7 @@
         /// <summary>
         /// The list of peers that we are currently trying to connect to
         /// </summary>
-        internal PeerConnectionIDCollection ConnectingToPeers
+        internal PeerIdCollection ConnectingToPeers
         {
             get { return this.connectingTo; }
         }
@@ -55,7 +55,7 @@
         /// <summary>
         /// The list of peers which have data queued up to send
         /// </summary>
-        internal PeerConnectionIDCollection UploadQueue
+        internal PeerIdCollection UploadQueue
         {
             get { return this.uploadQueue; }
         }
@@ -63,7 +63,7 @@
         /// <summary>
         /// The list of peers which have data queued up to download
         /// </summary>
-        internal PeerConnectionIDCollection DownloadQueue
+        internal PeerIdCollection DownloadQueue
         {
             get { return this.downloadQueue; }
         }
@@ -76,11 +76,11 @@
         internal PeerList(TorrentManager manager)
         {
             this.manager = manager;
-            this.availablePeers = new PeerConnectionIDCollection();
-            this.connectedPeers = new PeerConnectionIDCollection();
-            this.connectingTo = new PeerConnectionIDCollection();
-            this.downloadQueue = new PeerConnectionIDCollection();
-            this.uploadQueue = new PeerConnectionIDCollection();
+            this.availablePeers = new PeerIdCollection();
+            this.connectedPeers = new PeerIdCollection();
+            this.connectingTo = new PeerIdCollection();
+            this.downloadQueue = new PeerIdCollection();
+            this.uploadQueue = new PeerIdCollection();
         }
 
         #endregion

Modified: trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/EndGamePicker.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/EndGamePicker.cs 
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/EndGamePicker.cs 
2007-05-01 20:16:18 UTC (rev 76547)
@@ -42,7 +42,7 @@
         private PieceCollection pieces;                                     // 
A list of all the remaining pieces to download
         private BlockCollection blocks;                                     // 
A list of all the blocks in the remaining pieces to download
         Dictionary<PeerId, BlockCollection> requests;             // Used to 
remember which blocks each peer is downloading
-        Dictionary<Block, PeerConnectionIDCollection> blockRequestees;      // 
Used to remember which peers are getting each block so i can issue cancel 
messages
+        Dictionary<Block, PeerIdCollection> blockRequestees;      // Used to 
remember which peers are getting each block so i can issue cancel messages
         #endregion
 
         #region Constructors
@@ -51,7 +51,7 @@
         {
             this.myBitfield = myBitfield;
             this.requests = new Dictionary<PeerId, BlockCollection>();
-            this.blockRequestees = new Dictionary<Block, 
PeerConnectionIDCollection>();
+            this.blockRequestees = new Dictionary<Block, PeerIdCollection>();
             this.pieces = new PieceCollection();
 
             // For all the pieces that we have *not* requested yet, add them 
into our list of pieces
@@ -100,7 +100,7 @@
                         {
                             activeRequests.Add(b);
                             if (!this.blockRequestees.ContainsKey(b))
-                                this.blockRequestees.Add(b, new 
PeerConnectionIDCollection());
+                                this.blockRequestees.Add(b, new 
PeerIdCollection());
 
                             this.blockRequestees[b].Add(keypair.Key);
                         }
@@ -133,7 +133,7 @@
         }
 
 
-        public override RequestMessage PickPiece(PeerId id, 
PeerConnectionIDCollection otherPeers)
+        public override RequestMessage PickPiece(PeerId id, PeerIdCollection 
otherPeers)
         {
             lock (this.requestsLocker)
             {
@@ -156,7 +156,7 @@
 
                     // Add the peer to the list of people who are downloading 
this block
                     if (!this.blockRequestees.ContainsKey(b))
-                        this.blockRequestees.Add(b, new 
PeerConnectionIDCollection());
+                        this.blockRequestees.Add(b, new PeerIdCollection());
 
                     this.blockRequestees[b].Add(id);
 
@@ -235,7 +235,7 @@
                 id.TorrentManager.HashedPiece(new 
PieceHashedEventArgs(p.Index, result));
 
                 BlockCollection activeRequests = this.requests[id];
-                PeerConnectionIDCollection activeRequestees = 
this.blockRequestees[p.Blocks[blockIndex]];
+                PeerIdCollection activeRequestees = 
this.blockRequestees[p.Blocks[blockIndex]];
                 activeRequests.Remove(p.Blocks[blockIndex]);
                 activeRequestees.Remove(id);
 
@@ -304,7 +304,7 @@
 
                 if (this.blockRequestees.ContainsKey(blocks[i]))
                 {
-                    PeerConnectionIDCollection requestees = 
this.blockRequestees[blocks[i]];
+                    PeerIdCollection requestees = 
this.blockRequestees[blocks[i]];
                     requestees.Remove(id);
                     if (requestees.Count == 0)
                         this.blockRequestees.Remove(blocks[i]);

Modified: trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/PiecePickerBase.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/PiecePickerBase.cs       
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/PiecePickerBase.cs       
2007-05-01 20:16:18 UTC (rev 76547)
@@ -58,7 +58,7 @@
 
         public abstract int CurrentRequestCount();
         public abstract bool IsInteresting(PeerId id);
-        public abstract RequestMessage PickPiece(PeerId id, 
PeerConnectionIDCollection otherPeers);
+        public abstract RequestMessage PickPiece(PeerId id, PeerIdCollection 
otherPeers);
         public abstract void ReceivedChokeMessage(PeerId id);
         public abstract void ReceivedRejectRequest(PeerId id, 
RejectRequestMessage message);
         public abstract PieceEvent ReceivedPieceMessage(PeerId id, byte[] 
buffer, PieceMessage message);

Modified: trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/StandardPicker.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/StandardPicker.cs        
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Client/PiecePicking/StandardPicker.cs        
2007-05-01 20:16:18 UTC (rev 76547)
@@ -302,7 +302,7 @@
         /// <param name="id">The id of the peer to request a piece off 
of</param>
         /// <param name="otherPeers">The other peers that are also downloading 
the same torrent</param>
         /// <returns></returns>
-        public override RequestMessage PickPiece(PeerId id, 
PeerConnectionIDCollection otherPeers)
+        public override RequestMessage PickPiece(PeerId id, PeerIdCollection 
otherPeers)
         {
             RequestMessage message = null;
 

Modified: 
trunk/bitsharp/src/MonoTorrent/Collections/PeerConnectionIDCollection.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Collections/PeerConnectionIDCollection.cs    
2007-05-01 20:15:51 UTC (rev 76546)
+++ trunk/bitsharp/src/MonoTorrent/Collections/PeerConnectionIDCollection.cs    
2007-05-01 20:16:18 UTC (rev 76547)
@@ -9,7 +9,7 @@
 
 namespace MonoTorrent
 {
-       public class PeerConnectionIDCollection : IList
+       public class PeerIdCollection : IList
        {
                #region Private Fields
 
@@ -24,7 +24,7 @@
 
                #region Constructors
 
-               public PeerConnectionIDCollection()
+               public PeerIdCollection()
                {
 #if NET_2_0
                        list = new List<PeerId>();
@@ -33,7 +33,7 @@
 #endif
                }
 
-               public PeerConnectionIDCollection(int capacity)
+               public PeerIdCollection(int capacity)
                {
 #if NET_2_0
                        list = new List<PeerId>(capacity);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to