aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/epee_levin_protocol_handler_async.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-01-16 19:04:22 +0200
committerRiccardo Spagni <ric@spagni.net>2019-01-16 19:04:22 +0200
commit846362842c9893cdbbea1dd1f00931c50bb2df5e (patch)
treec7e91557c2349a3cbeb23053950de96185428595 /tests/unit_tests/epee_levin_protocol_handler_async.cpp
parentMerge pull request #4973 (diff)
parentepee: better network buffer data structure (diff)
downloadmonero-846362842c9893cdbbea1dd1f00931c50bb2df5e.tar.xz
Merge pull request #4976
85665003 epee: better network buffer data structure (moneromooo-monero)
Diffstat (limited to 'tests/unit_tests/epee_levin_protocol_handler_async.cpp')
-rw-r--r--tests/unit_tests/epee_levin_protocol_handler_async.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp
index 10e62c167..9ea71875b 100644
--- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp
+++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp
@@ -56,22 +56,22 @@ namespace
{
}
- virtual int invoke(int command, const std::string& in_buff, std::string& buff_out, test_levin_connection_context& context)
+ virtual int invoke(int command, const epee::span<const uint8_t> in_buff, std::string& buff_out, test_levin_connection_context& context)
{
m_invoke_counter.inc();
boost::unique_lock<boost::mutex> lock(m_mutex);
m_last_command = command;
- m_last_in_buf = in_buff;
+ m_last_in_buf = std::string((const char*)in_buff.data(), in_buff.size());
buff_out = m_invoke_out_buf;
return m_return_code;
}
- virtual int notify(int command, const std::string& in_buff, test_levin_connection_context& context)
+ virtual int notify(int command, const epee::span<const uint8_t> in_buff, test_levin_connection_context& context)
{
m_notify_counter.inc();
boost::unique_lock<boost::mutex> lock(m_mutex);
m_last_command = command;
- m_last_in_buf = in_buff;
+ m_last_in_buf = std::string((const char*)in_buff.data(), in_buff.size());
return m_return_code;
}