forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
e1f433f5db
commit
68d9c4f4b0
|
@ -101,6 +101,7 @@ party.</li>
|
|||
of a resumed torrent. Saves the storage state, piece_picker state as well as all local
|
||||
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 files > 2 gigabytes (currently only on windows)</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<p>Functions that are yet to be implemented:</p>
|
||||
|
|
|
@ -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
|
||||
peers in a separate fast-resume file.
|
||||
* 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
|
||||
.. _Azureus: http://azureus.sourceforge.net
|
||||
|
|
|
@ -57,6 +57,10 @@ namespace libtorrent
|
|||
const file::seek_mode file::begin(1);
|
||||
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
|
||||
{
|
||||
impl() {}
|
||||
|
@ -93,8 +97,9 @@ namespace libtorrent
|
|||
size_type write(const char* buf, size_type num_bytes)
|
||||
{
|
||||
// TODO: split the write if num_bytes > 2 gig
|
||||
std::ostream::pos_type a = m_file.tellp();
|
||||
m_file.write(buf, num_bytes);
|
||||
return 0;
|
||||
return m_file.tellp() - a;
|
||||
}
|
||||
|
||||
void seek(size_type offset, int m)
|
||||
|
@ -113,6 +118,7 @@ namespace libtorrent
|
|||
fs::fstream m_file;
|
||||
};
|
||||
|
||||
// pimpl forwardings
|
||||
|
||||
file::file() : m_impl(new impl()) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue