- int TxHeader();
- int RxHeaderAnswer();
-
- int TxLogin();
- int RxLoginAnswer();
-
- int TxLoginS();
- int RxLoginSAnswer();
-
- int TxData(const char * text);
- int TxData(char * data);
- int RxDataAnswer();
-
- void Encrypt(char * d, const char * s, BLOWFISH_CTX *ctx);
- 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];
- short unsigned port;
- char login[ADM_LOGIN_LEN];
- char password[ADM_PASSWD_LEN];
- int outerSocket;
- int localSocket;
- struct sockaddr_in outerAddr;
- struct sockaddr_in localAddr;
- int error;
- std::list<std::string> answerList;
- RxCallback_t RxCallBack;
- void * dataRxCallBack;
- char errorMsg[MAX_ERR_STR_LEN];
+ int TxHeader();
+ int RxHeaderAnswer();
+
+ int TxLogin();
+ int RxLoginAnswer();
+
+ int TxLoginS();
+ int RxLoginSAnswer();
+
+ int TxData(const std::string & text);
+ int RxDataAnswer(CALLBACK f, void * data);
+
+ std::string server;
+ uint16_t port;
+ std::string localAddress;
+ uint16_t localPort;
+ std::string login;
+ std::string password;
+ int outerSocket;
+ std::string errorMsg;