| 59 | // of `connect()`. |
| 60 | template<typename T, typename AddressType> |
| 61 | static 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 | |
| 80 | class SocketTest : public TemporaryDirectoryTest {}; |
| 81 | |