*** empty log message ***

This commit is contained in:
Arvid Norberg
2004-01-16 12:43:23 +00:00
parent e1f433f5db
commit 68d9c4f4b0
3 changed files with 9 additions and 1 deletions

View File

@@ -101,6 +101,7 @@ party.</li>
of a resumed torrent. Saves the storage state, piece_picker state as well as all local of a resumed torrent. Saves the storage state, piece_picker state as well as all local
peers in a separate fast-resume file.</li> peers in a separate fast-resume file.</li>
<li>Supports the extension protocol <a class="reference" href="http://nolar.com/azureus/extended.htm">described by Nolar</a>. See <a class="reference" href="#extensions">extensions</a>.</li> <li>Supports the extension protocol <a class="reference" href="http://nolar.com/azureus/extended.htm">described by Nolar</a>. See <a class="reference" href="#extensions">extensions</a>.</li>
<li>SUpports files &gt; 2 gigabytes (currently only on windows)</li>
</ul> </ul>
</blockquote> </blockquote>
<p>Functions that are yet to be implemented:</p> <p>Functions that are yet to be implemented:</p>

View File

@@ -40,6 +40,7 @@ The current state includes the following features:
of a resumed torrent. Saves the storage state, piece_picker state as well as all local of a resumed torrent. Saves the storage state, piece_picker state as well as all local
peers in a separate fast-resume file. peers in a separate fast-resume file.
* Supports the extension protocol `described by Nolar`__. See extensions_. * Supports the extension protocol `described by Nolar`__. See extensions_.
* Supports files > 2 gigabytes (currently only on windows)
__ http://home.elp.rr.com/tur/multitracker-spec.txt __ http://home.elp.rr.com/tur/multitracker-spec.txt
.. _Azureus: http://azureus.sourceforge.net .. _Azureus: http://azureus.sourceforge.net

View File

@@ -57,6 +57,10 @@ namespace libtorrent
const file::seek_mode file::begin(1); const file::seek_mode file::begin(1);
const file::seek_mode file::end(2); const file::seek_mode file::end(2);
// TODO: this implementation will behave strange if
// a file is opened for both reading and writing
// and both read from and written to. Since the
// write-file position isn't updated when reading.
struct file::impl struct file::impl
{ {
impl() {} impl() {}
@@ -93,8 +97,9 @@ namespace libtorrent
size_type write(const char* buf, size_type num_bytes) size_type write(const char* buf, size_type num_bytes)
{ {
// TODO: split the write if num_bytes > 2 gig // TODO: split the write if num_bytes > 2 gig
std::ostream::pos_type a = m_file.tellp();
m_file.write(buf, num_bytes); m_file.write(buf, num_bytes);
return 0; return m_file.tellp() - a;
} }
void seek(size_type offset, int m) void seek(size_type offset, int m)
@@ -113,6 +118,7 @@ namespace libtorrent
fs::fstream m_file; fs::fstream m_file;
}; };
// pimpl forwardings
file::file() : m_impl(new impl()) {} file::file() : m_impl(new impl()) {}