mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 14:06:07 -04:00
Add ref-counted buffer byte_slice. Currently used for sending TCP data.
This commit is contained in:
parent
cdfa2e58df
commit
bdfc63ae4d
13 changed files with 882 additions and 153 deletions
|
@ -149,11 +149,11 @@ namespace
|
|||
}
|
||||
|
||||
// Implement epee::net_utils::i_service_endpoint interface
|
||||
virtual bool do_send(const void* ptr, size_t cb)
|
||||
virtual bool do_send(epee::byte_slice message)
|
||||
{
|
||||
m_send_counter.inc();
|
||||
boost::unique_lock<boost::mutex> lock(m_mutex);
|
||||
m_last_send_data.append(reinterpret_cast<const char*>(ptr), cb);
|
||||
m_last_send_data.append(reinterpret_cast<const char*>(message.data()), message.size());
|
||||
return m_send_return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue