Fixed bug that cause exception to be thrown when erasing a download.

Moved to using SocketAddress within src/net.

Enabled SocketManager.

Changed API to use uint32_t instead of int.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@485 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-07-04 16:14:13 +00:00
parent 0588e66eaf
commit fc8ca7df20
8 changed files with 43 additions and 12 deletions
+10 -3
View File
@@ -57,6 +57,7 @@ WindowStatusbar::redraw() {
m_canvas->erase();
// TODO: Make a buffer with size = get_width?
int pos = 0;
char buf[128];
@@ -70,14 +71,20 @@ WindowStatusbar::redraw() {
else
pos = snprintf(buf + pos, 128 - pos, "%-3i", torrent::get_read_throttle() / 1024);
m_canvas->print(0, 0, "Throttle U/D: %s Rate: %5.1f / %5.1f KiB Listen: %s:%i%s Handshakes: %i",
m_canvas->print(0, 0, "Throttle U/D: %s Rate: %5.1f / %5.1f KiB Listen: %s:%i%s",
buf,
(double)torrent::get_write_rate() / 1024.0,
(double)torrent::get_read_rate() / 1024.0,
!torrent::get_ip().empty() ? torrent::get_ip().c_str() : "<default>",
(int)torrent::get_listen_port(),
!torrent::get_bind().empty() ? (" Bind: " + torrent::get_bind()).c_str() : "",
torrent::get_total_handshakes());
!torrent::get_bind().empty() ? (" Bind: " + torrent::get_bind()).c_str() : "");
pos = snprintf(buf, 128, "[%3i/%3i/%3i]",
torrent::get_total_handshakes(),
torrent::get_open_sockets(),
torrent::get_max_open_sockets());
m_canvas->print(m_canvas->get_width() - pos, 0, "%s", buf);
}
}