namespace libt2n
{
+/** @brief handles socket based communication.
+ Don't use directly, use socket_server or socket_client_connection instead.
+*/
class socket_handler
{
private:
virtual void log(log_level_values level, const char* message)
{ return; }
- public:
- socket_type_value get_type()
- { return socket_type; }
+ void socket_write(const std::string& data);
+
+ virtual void close();
bool fill_buffer(std::string& buffer, long long usec_timeout);
bool fill_buffer(std::string& buffer);
- virtual void close();
+ public:
+ /// is this a tcp or udp socket connection
+ socket_type_value get_type()
+ { return socket_type; }
bool is_closed();
-
- void socket_write(const std::string& data);
};
}