|
@@ -59,7 +59,7 @@ void threadclientai(int ai)
|
|
|
}
|
|
|
void threadclient()
|
|
|
{
|
|
|
- iv::service::Client xclient("hellob");
|
|
|
+ iv::service::Client xclient("helloa");
|
|
|
|
|
|
// std::this_thread::sleep_for(std::chrono::milliseconds(3));
|
|
|
std::cout<<"Send Time : "<<QDateTime::currentMSecsSinceEpoch()<<std::endl;
|
|
@@ -75,7 +75,7 @@ void threadclient()
|
|
|
{
|
|
|
std::cout<<" Fail Get Result."<<std::endl;
|
|
|
}
|
|
|
- return ;
|
|
|
+ // return ;
|
|
|
int nsendsize = 100;
|
|
|
while(nsendsize < 1000000)
|
|
|
{
|
|
@@ -111,19 +111,20 @@ int main(int argc, char *argv[])
|
|
|
qint64 xtime1 = std::chrono::system_clock::now().time_since_epoch().count();
|
|
|
qint64 xtime2 = std::chrono::system_clock::now().time_since_epoch().count();
|
|
|
qint64 xtd = xtime2 - xtime1;
|
|
|
-// iv::service::Server xserver("helloa",ProcReq);
|
|
|
-// std::this_thread::sleep_for(std::chrono::milliseconds(300));
|
|
|
+ iv::service::Server xserver("helloa",ProcReq);
|
|
|
+ std::this_thread::sleep_for(std::chrono::milliseconds(300));
|
|
|
+ std::thread * pthread = new std::thread(threadclient);
|
|
|
// std::thread * pthread_a = new std::thread(threadclientai,1);
|
|
|
// std::thread * pthread_b = new std::thread(threadclientai,2);
|
|
|
|
|
|
|
|
|
|
|
|
- iv::service::Client xaync("async");
|
|
|
- std::shared_ptr<char> pstr_async = std::shared_ptr<char>(new char[1000]);
|
|
|
- xaync.AsyncSendRequest(pstr_async,100,ProcAsync);
|
|
|
+// iv::service::Client xaync("async");
|
|
|
+// std::shared_ptr<char> pstr_async = std::shared_ptr<char>(new char[1000]);
|
|
|
+// xaync.AsyncSendRequest(pstr_async,100,ProcAsync);
|
|
|
|
|
|
- std::this_thread::sleep_for(std::chrono::milliseconds(10000));
|
|
|
- iv::service::Server xserver("async",ProcReq);
|
|
|
+// std::this_thread::sleep_for(std::chrono::milliseconds(10000));
|
|
|
+// iv::service::Server xserver("async",ProcReq);
|
|
|
|
|
|
|
|
|
|