mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 10:15:00 -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
|
@ -53,6 +53,7 @@
|
|||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/interprocess/detail/atomic.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include "byte_slice.h"
|
||||
#include "net_utils_base.h"
|
||||
#include "syncobj.h"
|
||||
#include "connection_basic.hpp"
|
||||
|
@ -135,8 +136,7 @@ namespace net_utils
|
|||
|
||||
private:
|
||||
//----------------- i_service_endpoint ---------------------
|
||||
virtual bool do_send(const void* ptr, size_t cb); ///< (see do_send from i_service_endpoint)
|
||||
virtual bool do_send_chunk(const void* ptr, size_t cb); ///< will send (or queue) a part of data
|
||||
virtual bool do_send(byte_slice message); ///< (see do_send from i_service_endpoint)
|
||||
virtual bool send_done();
|
||||
virtual bool close();
|
||||
virtual bool call_run_once_service_io();
|
||||
|
@ -145,6 +145,8 @@ namespace net_utils
|
|||
virtual bool add_ref();
|
||||
virtual bool release();
|
||||
//------------------------------------------------------
|
||||
bool do_send_chunk(byte_slice chunk); ///< will send (or queue) a part of data. internal use only
|
||||
|
||||
boost::shared_ptr<connection<t_protocol_handler> > safe_shared_from_this();
|
||||
bool shutdown();
|
||||
/// Handle completion of a receive operation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue