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)