Classes | |
class | TheConfig |
parameters controlling outgoing connection More... | |
Functions | |
bool | Connect () |
locate and connect to the configured server More... | |
void | CloseConnection () |
close the current connection More... | |
void | InitTls () |
Initialize TLS library environment when necessary. More... | |
bool | MaybeStartTls (const char *hostname) |
void | ShutdownTls () |
De-initialize TLS library environment when necessary. More... | |
ssize_t | Write (const void *buf, size_t len) |
ssize_t | Read (void *buf, size_t len) |
Variables | |
TheConfig | Config |
Function Documentation
◆ CloseConnection()
void Transport::CloseConnection | ( | ) |
◆ Connect()
bool Transport::Connect | ( | ) |
Definition at line 214 of file Transport.cc.
References client_comm_connect(), Config, conn, debugVerbose, Transport::TheConfig::hostname, MAX_IPSTRLEN, MaybeStartTls(), resolveDestination(), and Ip::Address::toUrl().
Referenced by main().
◆ InitTls()
void Transport::InitTls | ( | ) |
Definition at line 353 of file Transport.cc.
References Transport::TheConfig::anonCredentials, Transport::TheConfig::caFiles, Transport::TheConfig::certCredentials, Transport::TheConfig::certFiles, Config, debugVerbose, gnutlsDebugHandler(), scParams, Transport::TheConfig::tlsEnabled, Parameters::verbosityLevel, verifyTlsCertificate(), and xstrerr().
Referenced by Transport::TheConfig::parseCommandOpts().
◆ MaybeStartTls()
bool Transport::MaybeStartTls | ( | const char * | hostname | ) |
perform TLS handshake on the currently open connection if TLS library has been initialized. return false on errors, true otherwise even if TLS not performed.
Definition at line 488 of file Transport.cc.
References Config, Transport::TheConfig::session, Transport::TheConfig::tlsEnabled, tryTlsAnonymous(), and tryTlsCertificate().
Referenced by Connect().
◆ Read()
ssize_t Transport::Read | ( | void * | buf, |
size_t | len | ||
) |
read up to len bytes from the currently open connection.
- Returns
- the number of bytes read, or -1 on errors
Definition at line 262 of file Transport.cc.
References Config, conn, Transport::TheConfig::ioTimeout, Transport::TheConfig::session, and Transport::TheConfig::tlsEnabled.
Referenced by main().
◆ ShutdownTls()
void Transport::ShutdownTls | ( | ) |
Definition at line 513 of file Transport.cc.
References Transport::TheConfig::anonCredentials, Transport::TheConfig::certCredentials, Config, debugVerbose, Transport::TheConfig::session, and Transport::TheConfig::tlsEnabled.
Referenced by main().
◆ Write()
ssize_t Transport::Write | ( | const void * | buf, |
size_t | len | ||
) |
write len bytes to the currently open connection.
- Returns
- the number of bytes written, or -1 on errors
Definition at line 238 of file Transport.cc.
References Config, conn, Transport::TheConfig::ioTimeout, Transport::TheConfig::session, and Transport::TheConfig::tlsEnabled.
Referenced by main().
Variable Documentation
◆ Config
|
extern |
Definition at line 23 of file Transport.cc.
Referenced by Connect(), doTlsHandshake(), InitTls(), loadTlsParameters(), main(), MaybeStartTls(), Read(), resolveDestination(), ShutdownTls(), tryTlsAnonymous(), tryTlsCertificate(), usage(), and Write().