aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/tls_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/tls_server.cpp')
-rw-r--r--doc/examples/tls_server.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp
index a5f2c5d78..6bbcfd8b5 100644
--- a/doc/examples/tls_server.cpp
+++ b/doc/examples/tls_server.cpp
@@ -12,7 +12,7 @@
using namespace Botan;
-using namespace std::tr1::placeholders;
+using namespace std::placeholders;
#include <stdio.h>
#include <string>
@@ -33,8 +33,8 @@ bool handshake_complete(const TLS::Session& session)
class Blocking_TLS_Server
{
public:
- Blocking_TLS_Server(std::tr1::function<void (const byte[], size_t)> output_fn,
- std::tr1::function<size_t (byte[], size_t)> input_fn,
+ Blocking_TLS_Server(std::function<void (const byte[], size_t)> output_fn,
+ std::function<size_t (byte[], size_t)> input_fn,
std::vector<std::string>& protocols,
TLS::Session_Manager& sessions,
Credentials_Manager& creds,
@@ -43,7 +43,7 @@ class Blocking_TLS_Server
input_fn(input_fn),
server(
output_fn,
- std::tr1::bind(&Blocking_TLS_Server::reader_fn, std::tr1::ref(*this), _1, _2, _3),
+ std::bind(&Blocking_TLS_Server::reader_fn, std::ref(*this), _1, _2, _3),
handshake_complete,
sessions,
creds,
@@ -119,7 +119,7 @@ class Blocking_TLS_Server
read_queue.write(buf, buf_len);
}
- std::tr1::function<size_t (byte[], size_t)> input_fn;
+ std::function<size_t (byte[], size_t)> input_fn;
TLS::Server server;
SecureQueue read_queue;
bool exit;
@@ -161,8 +161,8 @@ int main(int argc, char* argv[])
printf("Got new connection\n");
Blocking_TLS_Server tls(
- std::tr1::bind(&Socket::write, std::tr1::ref(sock), _1, _2),
- std::tr1::bind(&Socket::read, std::tr1::ref(sock), _1, _2, true),
+ std::bind(&Socket::write, std::ref(sock), _1, _2),
+ std::bind(&Socket::read, std::ref(sock), _1, _2, true),
protocols,
sessions,
creds,