#include <TCPClient.h>
Definition at line 28 of file TCPClient.h.
Public Member Functions | |
TCPClient (const char *logbase="/oasys/tcpclient", bool init_socket_immediately=false) | |
TCPClient (int fd, in_addr_t remote_addr, u_int16_t remote_port, const char *logbase="/oasys/tcpclient") | |
virtual int | timeout_connect (in_addr_t remote_attr, u_int16_t remote_port, int timeout_ms, int *errp=0) |
Try to connect to the remote host, but don't block for more than timeout milliseconds. | |
Protected Member Functions | |
int | internal_connect (in_addr_t remote_attr, u_int16_t remote_port) |
Private Member Functions | |
TCPClient (const TCPClient &) | |
Prohibited constructor. |
oasys::TCPClient::TCPClient | ( | const TCPClient & | ) | [private] |
Prohibited constructor.
oasys::TCPClient::TCPClient | ( | const char * | logbase = "/oasys/tcpclient" , |
|
bool | init_socket_immediately = false | |||
) |
Definition at line 28 of file TCPClient.cc.
References ASSERT, oasys::IPSocket::fd_, and oasys::IPSocket::init_socket().
oasys::TCPClient::TCPClient | ( | int | fd, | |
in_addr_t | remote_addr, | |||
u_int16_t | remote_port, | |||
const char * | logbase = "/oasys/tcpclient" | |||
) |
Definition at line 37 of file TCPClient.cc.
int oasys::TCPClient::timeout_connect | ( | in_addr_t | remote_attr, | |
u_int16_t | remote_port, | |||
int | timeout_ms, | |||
int * | errp = 0 | |||
) | [virtual] |
Try to connect to the remote host, but don't block for more than timeout milliseconds.
If there was an error (either immediate or delayed), return it in *errp.
Definition at line 44 of file TCPClient.cc.
References ASSERT, oasys::IO::CONNECT, oasys::IPSocket::connect(), errno, oasys::IPSocket::ESTABLISHED, oasys::IPSocket::fd_, oasys::IOHandlerBase::get_notifier(), oasys::IPSocket::init_socket(), oasys::IOERROR, oasys::IOTIMEOUT, log_debug, log_err, oasys::Logger::logpath_, oasys::IOHandlerBase::monitor(), oasys::IO::poll_single(), oasys::IO::set_nonblocking(), oasys::IPSocket::set_state(), and oasys::IPSocket::state_.
int oasys::TCPClient::internal_connect | ( | in_addr_t | remote_attr, | |
u_int16_t | remote_port | |||
) | [protected] |