MCPcopy Create free account
hub / github.com/apache/thrift / main

Function main

test/threads/ThreadsClient.cpp:42–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using namespace apache::thrift::concurrency;
41
42int main(int argc, char **argv) {
43#if _WIN32
44 transport::TWinsockSingleton::create();
45#endif
46 int port = 9090;
47 std::string host = "localhost";
48
49 shared_ptr<TTransport> transport(new TSocket(host, port));
50 shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
51
52 transport->open();
53
54 ThreadsTestClient client(protocol);
55 int val;
56 val = client.threadOne(5);
57 fprintf(stderr, "%d\n", val);
58 val = client.stop();
59 fprintf(stderr, "%d\n", val);
60 val = client.threadTwo(5);
61 fprintf(stderr, "%d\n", val);
62
63 transport->close();
64
65 fprintf(stderr, "done.\n");
66
67 return 0;
68}
69

Callers

nothing calls this directly

Calls 5

threadOneMethod · 0.80
threadTwoMethod · 0.80
closeMethod · 0.65
openMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected