Author: alanmc Date: 2006-11-02 18:26:15 -0500 (Thu, 02 Nov 2006) New Revision: 67305
Added: trunk/bitsharp/src/MonoTorrent.Client/CLASS DESCRIPTION Log: Preliminary Class Description document. Gives brief outline of what each class does Added: trunk/bitsharp/src/MonoTorrent.Client/CLASS DESCRIPTION =================================================================== --- trunk/bitsharp/src/MonoTorrent.Client/CLASS DESCRIPTION 2006-11-02 23:25:54 UTC (rev 67304) +++ trunk/bitsharp/src/MonoTorrent.Client/CLASS DESCRIPTION 2006-11-02 23:26:15 UTC (rev 67305) @@ -0,0 +1,145 @@ +This is a brief description of all the classes in MonoTorrent and what they do: + +AllowedFastAlgorithm.cs +----------------------- +This is used to calculate the pieces that a peer can request while still choked. Normally a request while choked would be rejected. + + + +BitField.cs +----------- +This represents an array of all the pieces of a torrent. Each element in the array is true if we have the piece with the corresponding number, and false if we don't have that piece. The array is zero based. + + + +BitFieldMessage.cs +------------------ +This represents the message that is used to send a bitfield to another peer. + + + +Block.cs +-------- +Each piece is subdivided into blocks of size 16kB. This class represents those blocks. When we want to download a piece, we send requests for all the different blocks in that piece. + + + +BufferManager.cs +---------------- +This class is used to reuse all byte[] send and receive buffers. All send and receive buffers are allocated in this class, and are returned to it when the transfer is finished. This allows approximately 50% reduction in currently allocated buffers and a huge saving over allocations over time (as new buffers no longer have to be constantly allocated). + + + +CancelMessage +------------- +This represents the message that is used to cancel a piece request that has been sent to another peer. + + + +ChokeMessage +------------ +This represents the message used to notify a peer that he is being choked + + + +ClientEngine.cs +--------------- +This is the motor for the engine. All user interaction to load/start/stop/pause torrents is done through the engine. It also is responsible for passing incoming connections to the correct TorrentManager. + + + +ConnectionListener.cs +--------------------- +This listens for incoming connections on the specified port. + + + +ConnectionManager.cs +-------------------- +This class is where all the sending and receiving of data and connecting to peers takes place. + + + +ConnectionMonitor.cs +-------------------- +This class is used to record the number of bytes sent or received from a specific peer. Based on this data it calculates that peer's average download rate. + + + +EngineSettings.cs +----------------- +This class contains all the different settings that can be set for the engine. + + + +ExtendedListMessage.cs +---------------------- +As part of ExtendedMessaging a list of all supported extended messages is sent between peers. This represents that message. + + + +FileManager.cs +-------------- +This class deals with all the reading/writing of data to the disk. It also calculates the SHA1 hash for pieces which have just been downloaded which can then be compared to the hash in the .torrent file to verify the piece is not corrupt. + + + +HandShakeMessage.cs +------------------- +This message is the first message sent between peers. If the handshakes match, the connection is kept open, otherwise the connection is closed. + + + +HaveAllMessage.cs +----------------- +This message is part of the FastPeers extension set. If you are a seeder (i.e. all the pieces have been downloaded) a HaveAllMessage can be sent instead of a BitFieldMessage to let a peer know you have all the pieces. + + + +HaveMessage.cs +-------------- +This message is sent to all peers when a piece has been successfully downloaded to let them know that you now have this piece. + + + +HaveNoneMessage.cs +------------------ +This message is part of the FastPeers extensions. If you are just starting a new torrent and have no pieces, this message can be sent instead of a BitField message to let the other peers know you have no pieces. + + + +HTTPConnection.cs +----------------- +This class will be used to represent a HTTP Peer (i.e. standard http link) + + + +Encryptor.cs +------------ +This is an interface which all connection encryption methods inherit from. + + + + +KeepAliveMessage.cs +------------------- +This message is sent to keep a connection alive if no other messages have been passed recently. + + + + + + +Piece.cs +-------- +A torrent is split up into "pieces" of length somewhere between 64kB and 2MB. This represents that. + + + +RateLimiter.cs +------------- +This struct holds a few variables which are used to save information needed for rate limiting and one method which is used for calculating how many chunks of information we can download per second. + + + +Tracker. \ No newline at end of file Property changes on: trunk/bitsharp/src/MonoTorrent.Client/CLASS DESCRIPTION ___________________________________________________________________ Name: svn:eol-style + native _______________________________________________ Mono-patches maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-patches
