diff options
Diffstat (limited to 'src/ssl/tls_record.h')
-rw-r--r-- | src/ssl/tls_record.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ssl/tls_record.h b/src/ssl/tls_record.h index 7ad866c6e..84929b0ff 100644 --- a/src/ssl/tls_record.h +++ b/src/ssl/tls_record.h @@ -16,6 +16,14 @@ #include <botan/secqueue.h> #include <vector> +#if defined(BOTAN_USE_STD_TR1) + #include <tr1/functional> +#elif defined(BOTAN_USE_BOOST_TR1) + #include <boost/tr1/functional.hpp> +#endif + +using namespace std::tr1::placeholders; + namespace Botan { /** @@ -37,7 +45,7 @@ class BOTAN_DLL Record_Writer void reset(); - Record_Writer(Socket& socket); + Record_Writer(std::tr1::function<void (const byte[], size_t)> output_fn); ~Record_Writer() { delete mac; } private: @@ -45,7 +53,7 @@ class BOTAN_DLL Record_Writer void send_record(byte type, byte major, byte minor, const byte input[], size_t length); - Socket& socket; + std::tr1::function<void (const byte[], size_t)> output_fn; Pipe cipher; MessageAuthenticationCode* mac; |