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

Method canCommunicate

lib/cpp/test/TNonblockingSSLServerTest.cpp:233–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 }
232
233 bool canCommunicate(int serverPort) {
234 std::shared_ptr<TSSLSocketFactory> pClientSocketFactory = createClientSocketFactory();
235 std::shared_ptr<TSSLSocket> socket = pClientSocketFactory->createSocket("localhost", serverPort);
236 socket->open();
237 test::ParentServiceClient client(std::make_shared<protocol::TBinaryProtocol>(
238 std::make_shared<transport::TFramedTransport>(socket)));
239 client.addString("foo");
240 std::vector<std::string> strings;
241 client.getStrings(strings);
242 return strings.size() == 1 && !(strings[0].compare("foo"));
243 }
244
245private:
246 std::shared_ptr<event_base> userEventBase_;

Callers

nothing calls this directly

Calls 7

createSocketMethod · 0.45
openMethod · 0.45
addStringMethod · 0.45
getStringsMethod · 0.45
sizeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected