]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/netunit.h
Рефакторинг кода классов NETTRANSACT и SERVCONF библиотеки поддержки
[stg.git] / stglibs / srvconf.lib / netunit.h
index f5161503d5f11722d092a57d8375d5e6aef75271..007dc8c570738c5be201ae99142d0ffc7bf6bae0 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+
 #include <list>
 #include <string>
 
@@ -80,7 +81,7 @@ class NETTRANSACT
 public:
     NETTRANSACT();
     int     Transact(const char * data);
-    char   *GetError();
+    const std::string & GetError() const;
 
     void    SetRxCallback(void * data, RxCallback_t);
 
@@ -111,7 +112,7 @@ private:
     void EnDecryptInit(const char * passwd, int passwdLen, BLOWFISH_CTX *ctx);
     void Decrypt(char * d, const char * s, BLOWFISH_CTX *ctx);
 
-    char    server[SERVER_NAME_LEN];
+    std::string server;
     short unsigned  port;
     char    login[ADM_LOGIN_LEN];
     char    password[ADM_PASSWD_LEN];
@@ -119,7 +120,7 @@ private:
     std::list<std::string>   answerList;
     RxCallback_t RxCallBack;
     void *  dataRxCallBack;
-    char    errorMsg[MAX_ERR_STR_LEN];
+    std::string errorMsg;
 };
 //---------------------------------------------------------------------------
 #endif