X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5ec330c9443a3ad42258159e11013c116d9c4978..4c064456f5d2093f802b474736d5be5051f857a0:/stglibs/srvconf.lib/netunit.h diff --git a/stglibs/srvconf.lib/netunit.h b/stglibs/srvconf.lib/netunit.h index dc705803..f87fb3a8 100644 --- a/stglibs/srvconf.lib/netunit.h +++ b/stglibs/srvconf.lib/netunit.h @@ -18,12 +18,6 @@ * Author : Boris Mikhailenko */ - /* - $Revision: 1.6 $ - $Date: 2010/02/11 12:32:53 $ - $Author: faust $ - */ - #ifndef NetUnitH #define NetUnitH @@ -31,7 +25,6 @@ #include -//--------------------------------------------------------------------------- class NETTRANSACT { public: @@ -39,24 +32,23 @@ public: NETTRANSACT(const std::string & server, uint16_t port, const std::string & login, const std::string & password); - int Transact(const char * request, CALLBACK f, void * data); + int Transact(const std::string & request, CALLBACK f, void * data); const std::string & GetError() const { return errorMsg; } - int Connect(); - void Disconnect(); + int Connect(); + void Disconnect(); private: - int TxHeader(); - int RxHeaderAnswer(); + int TxHeader(); + int RxHeaderAnswer(); - int TxLogin(); - int RxLoginAnswer(); + int TxLogin(); + int RxLoginAnswer(); - int TxLoginS(); - int RxLoginSAnswer(); + int TxLoginS(); + int RxLoginSAnswer(); - int TxData(const char * text); - int TxData(char * data); - int RxDataAnswer(CALLBACK f, void * data); + int TxData(const std::string & text); + int RxDataAnswer(CALLBACK f, void * data); std::string server; uint16_t port; @@ -65,5 +57,5 @@ private: int outerSocket; std::string errorMsg; }; -//--------------------------------------------------------------------------- + #endif