There is now a partially functional block display in the aesalon GUI.
[aesalon.git] / src / platform / TCPSocket.h
blob72edb16ae6f6510084544ae3f45ddc1a21b63b9f
1 #ifndef AESALON_PLATFORM_TCPSOCKET_H
2 #define AESALON_PLATFORM_TCPSOCKET_H
4 #include <string>
6 namespace Aesalon {
7 namespace Platform {
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 Platform
27 } // namespace Aesalon
29 #endif