X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b3139bf3f37b3b0244efea8b4b5e5a7d0bc90095..3334627402c6bf40e156f9dc7592e941d81b574c:/stglibs/srvconf.lib/netunit.h?ds=sidebyside diff --git a/stglibs/srvconf.lib/netunit.h b/stglibs/srvconf.lib/netunit.h index f87fb3a8..ca13bbc8 100644 --- a/stglibs/srvconf.lib/netunit.h +++ b/stglibs/srvconf.lib/netunit.h @@ -25,6 +25,9 @@ #include +namespace STG +{ + class NETTRANSACT { public: @@ -32,6 +35,10 @@ public: 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); + ~NETTRANSACT(); int Transact(const std::string & request, CALLBACK f, void * data); const std::string & GetError() const { return errorMsg; } @@ -52,10 +59,17 @@ private: std::string server; uint16_t port; + std::string localAddress; + uint16_t localPort; std::string login; std::string password; - int outerSocket; + int sock; std::string errorMsg; + + static bool TxCrypto(const void * block, size_t size, void * data); + static bool RxCrypto(const void * block, size_t size, void * data); }; +} // namespace STG + #endif