diff options
author | Lee Clagett <code@leeclagett.com> | 2019-05-11 11:38:35 -0400 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2019-07-16 16:30:35 +0000 |
commit | bdfc63ae4ddc52e2dece2a031a91509418206cb0 (patch) | |
tree | 495b13c21a9be88fd2aab8f4d188f115053d12c5 /contrib/epee/include/net/abstract_tcp_server2.h | |
parent | Merge pull request #5827 (diff) | |
download | monero-bdfc63ae4ddc52e2dece2a031a91509418206cb0.tar.xz |
Add ref-counted buffer byte_slice. Currently used for sending TCP data.
Diffstat (limited to 'contrib/epee/include/net/abstract_tcp_server2.h')
-rw-r--r-- | contrib/epee/include/net/abstract_tcp_server2.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.h b/contrib/epee/include/net/abstract_tcp_server2.h index b38ab5399..373ef0dc6 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.h +++ b/contrib/epee/include/net/abstract_tcp_server2.h @@ -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. |