Began removal of platform/. The Monitor:: namespace is completely converted.
[aesalon.git] / src / monitor / TCPSocket.h
blob7d209b992b8852897753f1f21e15c788a18427f0
1 #ifndef AESALON_MONITOR_TCPSOCKET_H
2 #define AESALON_MONITOR_TCPSOCKET_H
4 #include <string>
6 namespace Aesalon {
7 namespace Monitor {
9 class TCPSocket {
10 private:
11 int socket_fd;
12 bool valid;
13 public:
14 TCPSocket(std::string host, int port);
15 TCPSocket(int socket_fd) : socket_fd(socket_fd), valid(true) {}
16 virtual ~TCPSocket();
18 void send_data(std::string data);
19 std::string get_data();
21 void disconnect();
23 bool is_valid() const { return valid; }
26 } // namespace Monitor
27 } // namespace Aesalon
29 #endif