Commit Graph

62 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
8203364972 2006-04-19 17:49:27 +00:00
Tatsuhiro Tsujikawa
19f713b99d 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add a readout of estimated remaining time to normal HTTP/FTP
	downloads:
	
	* src/ConsoleDownloadEngine.h (startup): New variable.
	(startupLength): New variable.
	(isStartupLengthSet): New variable.
	(avgSpeed): New variable.
	(eta): New variable.
	* src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout 
of
	estimated remaining time.
	(initStatistics): Initialized newly added variables.
	(calculateStatistics): Calculate average speed and estimated 
remaining
	time.

	To decouple TorrentDownloadEngine from HttpResponseCommand:

	* src/TrackerDownloadCommand.h: Removed.
	* src/TrackerDownloadCommand.cc: Removed.
	* src/TrackerInitCommand.h: Removed.
	* src/TrackerInitCommand.cc: Removed.
	* src/TrackerUpdateCommand.h: Removed.
	* src/TrackerUpdateCommand.cc: Removed.
	* src/TrackerWatcherCommand.cc (execute): The construction of 
request
	url written in TrackerInitCommand was moved here. Do not create
	tracker request command if torretnMan->trackers != 0.
	* src/CompactTrackerResponseProcessor.h: New class.
	* src/CompactTrackerResponseProcessor.cc: New class.
	* src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
	* src/HttpResponseCommand.cc (createHttpDownloadCommand):
	Decoupled TorrentDownloadEngine from this.
	* src/SegmentMan.h (init): New function.
	* src/SegmentMan.cc (init): New function.
	* src/TorrentMan.h (responseProcessor): New variable.
	(trackers): New variable.
	(setTrackerResponseProcessor): New function.
	(getTrackerResponseProcessor): New function.
	(processTrackerResponse): New function.
	* src/TorrentMan.cc (Constructor): Initialized new variable 
trackers.
	(processTrackerResponse): New function.
	* src/main.cc (main): Use ByteArrayDiskWriter and
	CompactTrackerResponseProcessor.
	* src/TorrentDownloadEngine.cc (afterEachIteration): Call 
torrentMan->
	processTrackerResponse().
	
	* src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated 
a
	readout.

	* src/TorrentDownloadEngine.cc (afterEachIteration): Added log 
message
	which indicates download has completed.

	* src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
	(closeFile): fd >= 0, not fd > 0

	* src/main.cc (main): Added short cut for show-files.
	Added short cut for torrent-file.
	Added new command-line option listen-port.
	Updated i18n messages.
2006-04-18 17:06:17 +00:00
Tatsuhiro Tsujikawa
58633887e9 2006-04-12 13:56:02 +00:00
Tatsuhiro Tsujikawa
305aad8690 2006-04-06 12:52:47 +00:00
Tatsuhiro Tsujikawa
8cec3f1153 2006-04-01 14:40:36 +00:00
Tatsuhiro Tsujikawa
4892b40945 2006-03-27 14:48:00 +00:00
Tatsuhiro Tsujikawa
1fcd640d3b * AbstractCommand.cc: casted timeout value to long long int.
* ChunkedEncoding.cc: fixed memory leak.
	* PeerInteractionCommand.cc: casted timeout value to long long 
int.
	* SleepCommand.cc: casted timeout value to long long int.
	* Data.cc: fixed memory leak.
	* Data.cc: fixed toLLInt().
	* BitfieldMan.cc: fixed memory leak.
	* TorrentMan.cc: initialized storeDir to ".".
	* TorrentMan.cc: fixed memory leak.
	* TorrentMan.cc: corrected file paths of splitted files.
	* PeerAbstractCommand.cc: casted timeout to long long int.
	* main.cc: added delete(req) and delete(te->diskWriter).
	* RequestSlot.cc: casted timeout value to long long int.
	* Request.cc: fixed memory leak.
	* PendingMessage.cc: make HAVE messages sent only when peer does 
not
	have the piece.
	* Peer.{h,cc}: added hasPiece(int index).
2006-03-23 10:47:25 +00:00
Tatsuhiro Tsujikawa
01118364a5 2006-03-21 16:07:22 +00:00
Tatsuhiro Tsujikawa
df6c7c0385 added bittorrent support(experimental) 2006-03-21 14:12:51 +00:00
Tatsuhiro Tsujikawa
2a1b2c8ab4 2006-03-07 13:58:29 +00:00
Tatsuhiro Tsujikawa
8d980589e3 2006-03-05 06:32:01 +00:00
Tatsuhiro Tsujikawa
0276b3bb37 * DownloadEngine.{h, cc}:
* ConsoleDownloadEngine.{h, cc}: Console output message(size, 
speed)
	is now generated by ConsoleDownloadEngine not by DownloadEngine.
	* main.cc: Download complete/abort message is now generated by 
main.
	* Makefile.am (SUBDIRS): Add m4.
	(ACLOCAL_AMFLAGS): New variable.
	(EXTRA_DIST): New variable.
	* configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
	* gettext: added gettext functionality
2006-03-02 10:43:00 +00:00