class
#include <eckit/net/ProxiedTCPClient.h>
ProxiedTCPClient
Base classes
- class TCPClient
Public static functions
-
static auto addrToHost(in_addr) -> std::
string -
static auto hostToAddr(const std::
string&) -> in_addr -
static auto hostName(const std::
string& h, bool full = false) -> std:: string - static void register_ignore_sigpipe()
Constructors, destructors, conversion operators
-
ProxiedTCPClient(const std::
string& proxyHost, int proxyPort, int port = 0) - ~ProxiedTCPClient() override
Public functions
-
auto connect(const std::
string& host, int port, int retries = 5, int timeout = 0) -> net:: TCPSocket& override -
auto connect(const net::
Endpoint& endpoint, int retries = 5, int timeout = 0) -> TCPSocket& virtual - auto write(const void* buf, long length) -> long
- auto read(void* buf, long length) -> long
- auto rawRead(void*, long) -> long
- auto isConnected() const -> bool
- auto stillConnected() const -> bool
- void close() virtual
- auto remoteAddr() const -> in_addr
-
auto remoteHost() const -> const std::
string& - auto remotePort() const -> int
- auto localAddr() const -> in_addr
-
auto localHost() const -> const std::
string& - auto localPort() const -> int
- void bufferSize(int n)
- void receiveBufferSize(int n)
- void sendBufferSize(int n)
- auto socket() -> int virtual
- void closeOutput()
- void closeInput()
- void debug(bool on)
Private functions
-
void print(std::
ostream& s) const override
Function documentation
static std:: string eckit:: ProxiedTCPClient:: addrToHost(in_addr)
#include <eckit/net/TCPSocket.h>
static in_addr eckit:: ProxiedTCPClient:: hostToAddr(const std:: string&)
#include <eckit/net/TCPSocket.h>
static std:: string eckit:: ProxiedTCPClient:: hostName(const std:: string& h,
bool full = false)
#include <eckit/net/TCPSocket.h>
static void eckit:: ProxiedTCPClient:: register_ignore_sigpipe()
#include <eckit/net/TCPSocket.h>
TCPSocket& eckit:: ProxiedTCPClient:: connect(const net:: Endpoint& endpoint,
int retries = 5,
int timeout = 0) virtual
#include <eckit/net/TCPClient.h>
long eckit:: ProxiedTCPClient:: write(const void* buf,
long length)
#include <eckit/net/TCPSocket.h>
long eckit:: ProxiedTCPClient:: read(void* buf,
long length)
#include <eckit/net/TCPSocket.h>
Parameters | |
---|---|
buf | The buffer to read into |
length | The maximum number of bytes to read |
Read from a TCP socket
Configuration flags
- useSelectOnTCPSocket (bool): use select for improved resilience on flaky connections
- socketSelectTimeout (long): timeout in seconds for the select (only if useSelectOnTCPSocket is enabled)
long eckit:: ProxiedTCPClient:: rawRead(void*,
long)
#include <eckit/net/TCPSocket.h>
bool eckit:: ProxiedTCPClient:: isConnected() const
#include <eckit/net/TCPSocket.h>
bool eckit:: ProxiedTCPClient:: stillConnected() const
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: close() virtual
#include <eckit/net/TCPSocket.h>
in_addr eckit:: ProxiedTCPClient:: remoteAddr() const
#include <eckit/net/TCPSocket.h>
const std:: string& eckit:: ProxiedTCPClient:: remoteHost() const
#include <eckit/net/TCPSocket.h>
int eckit:: ProxiedTCPClient:: remotePort() const
#include <eckit/net/TCPSocket.h>
in_addr eckit:: ProxiedTCPClient:: localAddr() const
#include <eckit/net/TCPSocket.h>
const std:: string& eckit:: ProxiedTCPClient:: localHost() const
#include <eckit/net/TCPSocket.h>
int eckit:: ProxiedTCPClient:: localPort() const
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: bufferSize(int n)
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: receiveBufferSize(int n)
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: sendBufferSize(int n)
#include <eckit/net/TCPSocket.h>
int eckit:: ProxiedTCPClient:: socket() virtual
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: closeOutput()
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: closeInput()
#include <eckit/net/TCPSocket.h>
void eckit:: ProxiedTCPClient:: debug(bool on)
#include <eckit/net/TCPSocket.h>