Author: alanmc
Date: 2007-05-30 14:04:25 -0400 (Wed, 30 May 2007)
New Revision: 78244
Modified:
trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs
trunk/bitsharp/src/MonoTorrent/Client/Tracker.cs
Log:
Cosmetic
Modified: trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs 2007-05-30
18:03:45 UTC (rev 78243)
+++ trunk/bitsharp/src/MonoTorrent/Client/ClientEngine.cs 2007-05-30
18:04:25 UTC (rev 78244)
@@ -48,11 +48,14 @@
/// </summary>
public class ClientEngine : IDisposable
{
- #region Global Supports
+ #region Global Constants
+
public static readonly bool SupportsFastPeer = true;
public static readonly bool SupportsEncryption = true;
public static readonly bool SupportsEndgameMode = false;
public static readonly bool SupportsDht = false;
+ internal const int TickLength = 500; // A logic tick will be
performed every TickLength miliseconds
+
#endregion
@@ -64,21 +67,22 @@
#region Member Variables
- /// <summary>
- /// This manager is used to control Send/Receive buffer allocations
for all running torrents
- /// </summary>
+
internal static readonly BufferManager BufferManager = new
BufferManager();
+ private ConnectionManager connectionManager;
+ private ConnectionListener listener; // Listens for incoming
connections and passes them off to the correct TorrentManager
+ private readonly string peerId;
+ private EngineSettings settings;
+ private System.Timers.Timer timer; // The timer used to call the
logic methods for the torrent managers
+ private int tickCount;
+ private TorrentManagerCollection torrents;
+ internal ReaderWriterLock torrentsLock;
- /// <summary>
- /// The connection manager which manages all the connections for the
library
- /// </summary>
- public ConnectionManager ConnectionManager
- {
- get { return this.connectionManager; }
- }
+ #endregion
- private ConnectionManager connectionManager;
+ #region Properties
+
/// <summary>
/// True if the engine has been started
/// </summary>
@@ -89,9 +93,12 @@
/// <summary>
- /// Listens for incoming connections and passes them off to the
correct TorrentManager
+ /// The connection manager which manages all the connections for the
library
/// </summary>
- private ConnectionListener listener;
+ public ConnectionManager ConnectionManager
+ {
+ get { return this.connectionManager; }
+ }
/// <summary>
@@ -101,7 +108,6 @@
{
get { return peerId; }
}
- private readonly string peerId = GeneratePeerId();
/// <summary>
@@ -112,22 +118,9 @@
get { return this.settings; }
set { this.settings = value; }
}
- private EngineSettings settings;
/// <summary>
- /// The timer used to call the logic methods for the torrent managers
- /// </summary>
- private System.Timers.Timer timer;
- private int tickCount;
-
-
- /// <summary>
- /// A logic tick will be performed every TickLength miliseconds
- /// </summary>
- internal const int TickLength = 500;
-
- /// <summary>
/// The TorrentManager's loaded into the engine
/// </summary>
public TorrentManagerCollection Torrents
@@ -135,9 +128,6 @@
get { return this.torrents; }
set { this.torrents = value; }
}
- private TorrentManagerCollection torrents;
-
- internal ReaderWriterLock torrentsLock = new ReaderWriterLock();
#endregion
@@ -158,9 +148,12 @@
this.connectionManager = new ConnectionManager(this);
this.listener = new ConnectionListener(this);
+ this.peerId = GeneratePeerId();
this.timer = new System.Timers.Timer(TickLength);
- this.timer.Elapsed += new ElapsedEventHandler(LogicTick);
this.torrents = new TorrentManagerCollection();
+ this.torrentsLock = new ReaderWriterLock();
+
+ this.timer.Elapsed += new ElapsedEventHandler(LogicTick);
}
#endregion
@@ -354,7 +347,6 @@
#region Private/Internal methods
-
private void AsyncStatsUpdate(object args)
{
if (StatsUpdate != null)
@@ -423,10 +415,5 @@
}
#endregion
-
-
-
-
-
}
}
\ No newline at end of file
Modified: trunk/bitsharp/src/MonoTorrent/Client/Tracker.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Tracker.cs 2007-05-30 18:03:45 UTC
(rev 78243)
+++ trunk/bitsharp/src/MonoTorrent/Client/Tracker.cs 2007-05-30 18:04:25 UTC
(rev 78244)
@@ -276,7 +276,7 @@
if (ipaddress != null)
{
sb.Append("&ip=");
- sb.Append(ipaddress.ToString());
+ sb.Append(ipaddress);
}
// If we have not successfully sent the started event to this
tier, override the passed in started event
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches