Added accessor functions for upload_rate_limit and download_rate_limit
This commit is contained in:
@@ -1566,7 +1566,6 @@ namespace libtorrent { namespace detail
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void session_impl::set_download_rate_limit(int bytes_per_second)
|
||||
{
|
||||
assert(bytes_per_second > 0 || bytes_per_second == -1);
|
||||
@@ -1677,6 +1676,18 @@ namespace libtorrent { namespace detail
|
||||
m_alerts.set_severity(s);
|
||||
}
|
||||
|
||||
int session_impl::upload_rate_limit() const
|
||||
{
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
return m_upload_rate;
|
||||
}
|
||||
|
||||
int session_impl::download_rate_limit() const
|
||||
{
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
return m_download_rate;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
void session_impl::check_invariant(const char *place)
|
||||
{
|
||||
|
Reference in New Issue
Block a user