]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/netunit.cpp
[NY Flight] One time protocol initialization.
[stg.git] / stglibs / srvconf.lib / netunit.cpp
index aaba3df6afc4aedbd2d7aafb3b74331472ba1017..db22a3a0ee27fb0bd136759fcae241d393144994 100644 (file)
 #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;