diff options
author | lloyd <[email protected]> | 2010-10-19 04:59:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-19 04:59:46 +0000 |
commit | fafe810679e01949ddd8ac86c8367f3c15b0bedc (patch) | |
tree | 3f6c1784aa8bc718fbe3a19e5645521d26ceaf4a /src/ssl/tls_record.h | |
parent | 221f9bd1469de9248b0233d366cdc2f0613fc182 (diff) |
Make Record_Writer call a callback instead of writing directly to the socket
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; |