|
@@ -243,6 +243,8 @@ void ListenData(const char * strdata,const unsigned int nSize,const unsigned int
|
|
|
char * strtem = new char[nSize];
|
|
|
memcpy(strtem,strdata,nSize);
|
|
|
gvectorquerymsgunit[i].mpstrmsgdata.reset(strtem);
|
|
|
+// gvectorquerymsgunit[i].mpstrmsgdata = std::shared_ptr<char>(new char[nSize]) ;//.reset(strtem);
|
|
|
+// mempcpy(gvectorquerymsgunit[i].mpstrmsgdata.get(),strdata,nSize);
|
|
|
gvectorquerymsgunit[i].mndatasize = nSize;
|
|
|
// std::cout<<" nsize is "<<nSize<<std::endl;
|
|
|
gvectorquerymsgunit[i].mbRefresh = true;
|
|
@@ -296,6 +298,14 @@ void testthread()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+void ServerThread()
|
|
|
+{
|
|
|
+ RunServer();
|
|
|
+}
|
|
|
+
|
|
|
+static std::thread * gpthreadserver;
|
|
|
+
|
|
|
int main(int argc, char *argv[])
|
|
|
{
|
|
|
QCoreApplication a(argc, argv);
|
|
@@ -314,7 +324,8 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
Init();
|
|
|
|
|
|
- RunServer();
|
|
|
+
|
|
|
+ gpthreadserver = new std::thread(ServerThread);
|
|
|
|
|
|
return a.exec();
|
|
|
}
|