mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 09:06:04 -04:00
Remove payload copy in all outgoing p2p messages
This commit is contained in:
parent
0b6bfb1fd8
commit
23aae5571b
20 changed files with 319 additions and 215 deletions
|
@ -68,13 +68,13 @@ namespace
|
|||
{
|
||||
}
|
||||
|
||||
virtual int invoke(int command, const epee::span<const uint8_t> in_buff, epee::byte_slice& buff_out, test_levin_connection_context& context)
|
||||
virtual int invoke(int command, const epee::span<const uint8_t> in_buff, epee::byte_stream& 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 = std::string((const char*)in_buff.data(), in_buff.size());
|
||||
buff_out = m_invoke_out_buf.clone();
|
||||
buff_out.write(epee::to_span(m_invoke_out_buf));
|
||||
return m_return_code;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue