blob: 7ce9142d3f865a12c2604eb67ec968384b1eb8ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// See LICENSE for license details.
#ifndef _RISCV_SOCKETIF_H
#define _RISCV_SOCKETIF_H
#include "config.h"
#ifdef HAVE_BOOST_ASIO
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>
#include <boost/asio.hpp>
class socketif_t
{
public:
socketif_t();
~socketif_t();
std::string rin(std::ostream &sout_); // read input command string
void wout(); // write output to socket
private:
// the following are needed for command socket interface
boost::asio::io_service *io_service_ptr;
boost::asio::ip::tcp::acceptor *acceptor_ptr;
std::unique_ptr<boost::asio::ip::tcp::socket> socket_ptr;
boost::asio::streambuf bout;
};
#endif
#endif
|