当前位置: 首页>>代码示例>>C++>>正文


C++ ZHTClient::tearDownTCP方法代码示例

本文整理汇总了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;
}
开发者ID:corentone,项目名称:FusionFS-IDA,代码行数:46,代码来源:client_main.cpp

示例2: c_zht_teardown_std

int c_zht_teardown_std(ZHTClient_c zhtClient) {

	ZHTClient * zhtcppClient = (ZHTClient *) zhtClient;

	return zhtcppClient->tearDownTCP();
}
开发者ID:dongfangzhao,项目名称:FusionFS-Surveyor,代码行数:6,代码来源:c_zhtclientStd.cpp

示例3: c_zht_teardown

int c_zht_teardown() {

	return zhtClient.tearDownTCP();
}
开发者ID:dongfangzhao,项目名称:fusionfs-hec,代码行数:4,代码来源:c_zhtclient.cpp


注:本文中的ZHTClient::tearDownTCP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。