aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/abstract_tcp_server2.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2019-05-11 11:38:35 -0400
committerLee Clagett <code@leeclagett.com>2019-07-16 16:30:35 +0000
commitbdfc63ae4ddc52e2dece2a031a91509418206cb0 (patch)
tree495b13c21a9be88fd2aab8f4d188f115053d12c5 /contrib/epee/include/net/abstract_tcp_server2.h
parentMerge pull request #5827 (diff)
downloadmonero-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.h6
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.