Functions | |
| int | open_socket (const std::string &hostname, int port, double timeout_connect, bool tcp_nodelay) |
| Attempt to open a TCP/IP socket connection to a server. | |
| int TcpClient::open_socket | ( | const std::string & | hostname, | |
| int | port, | |||
| double | timeout_connect, | |||
| bool | tcp_nodelay | |||
| ) |
Attempt to open a TCP/IP socket connection to a server.
Connect to the server running on port port of host hostname. Give up trying to connect after timeout_connect seconds.
Definition at line 46 of file tcpclient.cc.
References close_fd_or_socket(), socket_errno, and SOCKLEN_T.