xapian-core  1.4.22
Functions
TcpClient Namespace Reference

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. More...
 

Function Documentation

◆ open_socket()

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 55 of file tcpclient.cc.

References CLOSESOCKET, FLAG_NAME, SOCK_CLOEXEC, socket_errno(), SOCKLEN_T, and RealTime::to_timeval().

Referenced by RemoteTcpClient::open_socket().