64,282
社区成员
发帖
与我相关
我的任务
分享
#ifndef NO_TSET_SSL_SOCKET_CLIENT
SslSocketClient socketClient(ip, port, true, true);
#else
SocketClient socketClient(ip, port, true, true);
#endif
Thread thread(socketClient);
socketClient.init();
thread.start();
int counter = 0;
TransferFileInfo transferFileInfo;
TranserFileHttpsInfo transferFileHttpInfo;
#ifndef NO_TEST_HTTP_DOWNLOAD
NetworkAccessManager downloadManager(true, true);
Thread downloadThread(downloadManager);
downloadManager.init();
socketClient.setDownloadManager(&downloadManager);
downloadThread.start();
#endif
#ifndef NO_TEST_SEND
counter = 1000;
while(counter--) {
std::string text = "wo de ming zi jiao cui-yuanyuan, wo lai zi China, fei chang gao xin ren shi ni men! ";
std::string lap(counter, 'x');
text += lap;
socketClient.send((unsigned char*)text.c_str(), text.length(), MSGFLAGID_COMMAND);
}
#endif