BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
tcp_socket_io_hooks.hpp
Go to the documentation of this file.
1 #include <boost/asio.hpp>
2 #include <memory>
3 
4 namespace fc
5 {
7  {
8  public:
9  virtual ~tcp_socket_io_hooks() {}
10  virtual size_t readsome(boost::asio::ip::tcp::socket& socket, char* buffer, size_t length) = 0;
11  virtual size_t readsome(boost::asio::ip::tcp::socket& socket, const std::shared_ptr<char>& buffer, size_t length, size_t offset) = 0;
12  virtual size_t writesome(boost::asio::ip::tcp::socket& socket, const char* buffer, size_t length) = 0;
13  virtual size_t writesome(boost::asio::ip::tcp::socket& socket, const std::shared_ptr<const char>& buffer, size_t length, size_t offset) = 0;
14  };
15 } // namesapce fc
virtual size_t writesome(boost::asio::ip::tcp::socket &socket, const char *buffer, size_t length)=0
virtual size_t readsome(boost::asio::ip::tcp::socket &socket, char *buffer, size_t length)=0
Definition: api.hpp:15