X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..3cc6c36fcf3f0c6449debeb56e53c2ede03efc26:/stglibs/srvconf.lib/netunit.h diff --git a/stglibs/srvconf.lib/netunit.h b/stglibs/srvconf.lib/netunit.h index 72d3b721..e288df86 100644 --- a/stglibs/srvconf.lib/netunit.h +++ b/stglibs/srvconf.lib/netunit.h @@ -30,11 +30,11 @@ #include #include #include + #include #include -#include "common.h" -#include "blowfish.h" +#include "stg/blowfish.h" #define STG_HEADER "SG04" #define OK_HEADER "OKHD" @@ -80,7 +80,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 +111,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