X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..c2d2b5b171463c34e92b84290109a43f44823101:/stglibs/srvconf.lib/netunit.h diff --git a/stglibs/srvconf.lib/netunit.h b/stglibs/srvconf.lib/netunit.h index 72d3b721..91218b18 100644 --- a/stglibs/srvconf.lib/netunit.h +++ b/stglibs/srvconf.lib/netunit.h @@ -30,6 +30,7 @@ #include #include #include + #include #include @@ -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,20 +112,15 @@ private: void EnDecryptInit(const char * passwd, int passwdLen, BLOWFISH_CTX *ctx); void Decrypt(char * d, const char * s, BLOWFISH_CTX *ctx); - //unsigned ip; - char server[SERVER_NAME_LEN]; + std::string server; short unsigned port; - char login[ADM_LOGIN_LEN]; - char password[ADM_PASSWD_LEN]; + std::string login; + std::string password; int outerSocket; - int localSocket; - struct sockaddr_in outerAddr; - struct sockaddr_in localAddr; - int error; std::list answerList; RxCallback_t RxCallBack; void * dataRxCallBack; - char errorMsg[MAX_ERR_STR_LEN]; + std::string errorMsg; }; //--------------------------------------------------------------------------- #endif