X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/68ff250b88c43acf959cdf80eb9c3a519157a3f7..6bd4918f85f22955197b200d79972d22159e89d8:/stglibs/srvconf.lib/netunit.cpp diff --git a/stglibs/srvconf.lib/netunit.cpp b/stglibs/srvconf.lib/netunit.cpp index aaba3df6..db22a3a0 100644 --- a/stglibs/srvconf.lib/netunit.cpp +++ b/stglibs/srvconf.lib/netunit.cpp @@ -53,8 +53,12 @@ #define RECV_HEADER_ANSWER_ERROR "Recv header answer error!" //--------------------------------------------------------------------------- -NETTRANSACT::NETTRANSACT() - : port(0), +NETTRANSACT::NETTRANSACT(const std::string & s, uint16_t p, + const std::string & l, const std::string & pwd) + : server(s), + port(p), + login(l), + password(pwd), outerSocket(-1), RxCallBack(NULL), dataRxCallBack(NULL) @@ -461,26 +465,6 @@ while (1) } } //--------------------------------------------------------------------------- -void NETTRANSACT::SetLogin(const char * l) -{ -login = l; -} -//--------------------------------------------------------------------------- -void NETTRANSACT::SetPassword(const char * p) -{ -password = p; -} -//--------------------------------------------------------------------------- -void NETTRANSACT::SetServer(const char * serverName) -{ -server = serverName; -} -//--------------------------------------------------------------------------- -void NETTRANSACT::SetServerPort(short unsigned p) -{ -port = p; -} -//--------------------------------------------------------------------------- void NETTRANSACT::SetRxCallback(void * data, RxCallback_t cb) { RxCallBack = cb;