From d2880ff6481bb3f777cefc08aad29cd16a2ca2db Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 31 Oct 2007 10:20:05 +0000 Subject: [PATCH] made allocate_send_buffer, setup_send and send_buffer virtual in peer_connection. Fixes #196 --- include/libtorrent/peer_connection.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index 8e368a580..805b38d9d 100755 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -367,8 +367,12 @@ namespace libtorrent return boost::optional(); } - void send_buffer(char const* begin, int size); - buffer::interval allocate_send_buffer(int size); + // these functions are virtual to let bt_peer_connection hook into them + // and encrypt the content + virtual void send_buffer(char const* begin, int size); + virtual buffer::interval allocate_send_buffer(int size); + virtual void setup_send(); + template void append_send_buffer(char* buffer, int size, Destructor const& destructor) { @@ -378,7 +382,6 @@ namespace libtorrent m_ses.log_buffer_usage(); #endif } - void setup_send(); #ifndef TORRENT_DISABLE_RESOLVE_COUNTRIES void set_country(char const* c)