X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_client.hxx;h=4b0431a9317ba85e73ed729dd6327fdbdd696a92;hp=c103cbb1c293cb4e259ed2540754981a07e3aa57;hb=ced847b29c9d6a123b08a743b5b542985f73b585;hpb=e1614a6d1d9c022b83c0aa8cdb948bd7dc98ff23 diff --git a/src/socket_client.hxx b/src/socket_client.hxx index c103cbb..4b0431a 100644 --- a/src/socket_client.hxx +++ b/src/socket_client.hxx @@ -51,6 +51,8 @@ class socket_client_connection : public client_connection, public socket_handler std::string server; int port; + std::string lastErrorMsg; + protected: std::ostream* get_logstream(log_level_values level) @@ -66,6 +68,8 @@ class socket_client_connection : public client_connection, public socket_handler int _max_retries=max_retries_default, std::ostream *_logstream=NULL, log_level_values _log_level=none); + ~socket_client_connection(); + /** @brief read data from the socket and copy it into buffer @param usec_timeout wait until new data is found, max timeout usecs. -1: wait endless @@ -81,6 +85,9 @@ class socket_client_connection : public client_connection, public socket_handler void close(); void reconnect(); + + std::string get_last_error_msg(void) + { return lastErrorMsg; } }; }