* Piece request messages didn't get read when they were the only

message in the buffer, it required an additional byte beyond the size
of the request body.

* More work on ClientInfo.

* Bound 'k' to disconnecting a peer. Consider a better key.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@647 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-03-06 20:43:44 +00:00
parent b00d083ac2
commit 6822261199
12 changed files with 531 additions and 38 deletions
+12
View File
@@ -171,6 +171,16 @@ Download::receive_prev() {
mark_dirty();
}
void
Download::receive_disconnect_peer() {
if (m_focus == m_peers.end())
return;
m_download->get_download().disconnect_peer(*m_focus);
mark_dirty();
}
void
Download::receive_peer_connected(torrent::Peer p) {
m_peers.push_back(p);
@@ -250,6 +260,8 @@ Download::bind_keys() {
(*m_bindings)['+'] = sigc::mem_fun(*this, &Download::receive_next_priority);
(*m_bindings)['-'] = sigc::mem_fun(*this, &Download::receive_prev_priority);
(*m_bindings)['k'] = sigc::mem_fun(*this, &Download::receive_disconnect_peer);
(*m_bindings)['t'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::tracker_manual_request), false);
(*m_bindings)['T'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::tracker_manual_request), true);
+2
View File
@@ -98,6 +98,8 @@ private:
void receive_next();
void receive_prev();
void receive_disconnect_peer();
void receive_peer_connected(torrent::Peer p);
void receive_peer_disconnected(torrent::Peer p);