本文整理汇总了C++中ZHTClient::tearDownTCP方法的典型用法代码示例。如果您正苦于以下问题:C++ ZHTClient::tearDownTCP方法的具体用法?C++ ZHTClient::tearDownTCP怎么用?C++ ZHTClient::tearDownTCP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZHTClient
的用法示例。
在下文中一共展示了ZHTClient::tearDownTCP方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[]) {
//cout << "Usage: ./client <num_operations> <memberList> <configFile>"<< endl;
/* For BG/P:
const string cmd = "cat /proc/personality.sh | grep BG_PSETORG";
string torusID = executeShell(cmd);
torusID.resize(torusID.size() - 1);
int pid = getpid();
unsigned int v = myhash(torusID.c_str(), 1000000) + pid;
//cout<<"client: pid = "<<pid<<endl;
//cout<<"Client random n = "<<v<<endl;
srand(v);
*/
char* isTCP = argv[4];
//cout<<"Protocol = "<<isTCP<<endl;
if (!strcmp("TCP", isTCP)) {
TCP = true;
} else {
TCP = false;
}
int numOper = atoi(argv[1]);
//cout<<"numOper = "<<numOper<<endl;
string cfgFile(argv[3]);
//cout<<"cfgFile = "<<cfgFile<<endl;
string memberList(argv[2]);
//cout<<"memberList: "<<memberList<<endl;
vector<string> pkgList;
ZHTClient testClient;
// int pid = getpid();
char* tmpStr;
stringstream ss; //create a stringstream
// ss << pid;
// string recordFile = "record." + ss.str();
// benchmarkTimeAnalize(cfgFile, memberList, pkgList, testClient, numOper, 15, recordFile);
//cout<<"start to insert..."<<endl;
insertMetadata(cfgFile, memberList, pkgList, testClient, numOper, 15); //25fro 128bytes.
//cout << "Client:main, start lookup \n";
benchmarkLookup(pkgList, testClient);
benchmarkRemove(pkgList, testClient);
testClient.tearDownTCP(TCP);
return 0;
}
示例2: c_zht_teardown_std
int c_zht_teardown_std(ZHTClient_c zhtClient) {
ZHTClient * zhtcppClient = (ZHTClient *) zhtClient;
return zhtcppClient->tearDownTCP();
}
示例3: c_zht_teardown
int c_zht_teardown() {
return zhtClient.tearDownTCP();
}