MCPcopy Create free account
hub / github.com/apache/mesos / connectSocket

Function connectSocket

3rdparty/libprocess/src/tests/socket_tests.cpp:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59// of `connect()`.
60template<typename T, typename AddressType>
61static Future<Nothing> connectSocket(
62 process::network::internal::Socket<T>& socket,
63 const AddressType& address)
64{
65 switch (socket.kind()) {
66 case process::network::internal::SocketImpl::Kind::POLL:
67 return socket.connect(address);
68#ifdef USE_SSL_SOCKET
69 case process::network::internal::SocketImpl::Kind::SSL:
70 // The tests below never define an appropriate hostname to use, thus
71 // relying implicitly on the 'legacy' hostname validation scheme.
72 return socket.connect(
73 address,
74 process::network::openssl::create_tls_client_config(None()));
75#endif
76 }
77 UNREACHABLE();
78}
79
80class SocketTest : public TemporaryDirectoryTest {};
81

Callers 2

TEST_FFunction · 0.70
TEST_PFunction · 0.70

Calls 4

create_tls_client_configFunction · 0.85
NoneClass · 0.85
kindMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected