- NETTRANSACT();
- int Transact(const char * data);
- char *GetError();
-
- void SetRxCallback(void * data, RxCallback_t);
-
- void SetServer(const char * serverName);
- void SetServerPort(short unsigned p);
-
- void SetLogin(const char * l);
- void SetPassword(const char * p);
- ////////////////////////////////////////////
- int Connect();
- int Disconnect();
- void Reset();
+ typedef bool (* CALLBACK)(const std::string &, bool, void *);
+
+ NETTRANSACT(const std::string & server, uint16_t port,
+ const std::string & login, const std::string & password);
+ NETTRANSACT(const std::string & server, uint16_t port,
+ const std::string & localAddress, uint16_t localPort,
+ const std::string & login, const std::string & password);
+ int Transact(const std::string & request, CALLBACK f, void * data);
+ const std::string & GetError() const { return errorMsg; }
+
+ int Connect();
+ void Disconnect();