X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_handler.hxx;fp=src%2Fsocket_handler.hxx;h=8ea65a1199751a8bde6a634b0401fc0eac4ea9f6;hp=832fa3af736018ff3c783e9251882ec981f360d6;hb=9424729586fdb0aabb671d2f1266bdb07e0bed38;hpb=07e98688a1a8c3e915ce923f79261a88251a9edd diff --git a/src/socket_handler.hxx b/src/socket_handler.hxx index 832fa3a..8ea65a1 100644 --- a/src/socket_handler.hxx +++ b/src/socket_handler.hxx @@ -24,6 +24,9 @@ namespace libt2n { +/** @brief handles socket based communication. + Don't use directly, use socket_server or socket_client_connection instead. +*/ class socket_handler { private: @@ -47,18 +50,19 @@ class socket_handler 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); }; }