rate_limited_udp_socket fixes

This commit is contained in:
Arvid Norberg 2008-11-08 21:44:24 +00:00
parent 9bba20cdb4
commit 3ed38059aa
2 changed files with 7 additions and 0 deletions

View File

@ -120,6 +120,7 @@ namespace libtorrent
void set_rate_limit(int limit) { m_rate_limit = limit; }
bool can_send() const { return int(m_queue.size()) >= m_queue_size_limit; }
bool send(udp::endpoint const& ep, char const* p, int len, error_code& ec);
void close();
private:
struct queued_packet

View File

@ -588,3 +588,9 @@ void rate_limited_udp_socket::on_tick(error_code const& e)
}
}
void rate_limited_udp_socket::close()
{
m_timer.cancel();
udp_socket::close();
}