aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/net_helper.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/epee/include/net/net_helper.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/epee/include/net/net_helper.h b/contrib/epee/include/net/net_helper.h
index 9446e3588..508c79d76 100644
--- a/contrib/epee/include/net/net_helper.h
+++ b/contrib/epee/include/net/net_helper.h
@@ -44,6 +44,7 @@
#include <boost/lambda/lambda.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/system/error_code.hpp>
+#include <boost/utility/string_ref.hpp>
#include <functional>
#include "net/net_utils_base.h"
#include "net/net_ssl.h"
@@ -280,7 +281,7 @@ namespace net_utils
inline
- bool send(const std::string& buff, std::chrono::milliseconds timeout)
+ bool send(const boost::string_ref buff, std::chrono::milliseconds timeout)
{
try
@@ -298,7 +299,7 @@ namespace net_utils
// object is used as a callback and will update the ec variable when the
// operation completes. The blocking_udp_client.cpp example shows how you
// can use boost::bind rather than boost::lambda.
- async_write(buff.c_str(), buff.size(), ec);
+ async_write(buff.data(), buff.size(), ec);
// Block until the asynchronous operation has completed.
while (ec == boost::asio::error::would_block)