#include <client.h>
|
| client () |
|
| client (int sock) |
|
virtual | ~client () |
|
ko | connect0 (uint32_t host, uint16_t port, bool block) |
|
ko | connect0 (const string &host, uint16_t port, bool block) |
|
virtual void | disconnect (uint16_t seq, const string &reason) |
|
virtual pair< security_level_t, string > | security_level () const |
|
bool | connected () const |
|
pair< uint32_t, uint16_t > | raddress () const |
|
virtual pair< ko, datagram * > | encrypt0 (datagram *d) const |
|
virtual pair< ko, datagram * > | decrypt0 (datagram *d) const |
|
virtual void | on_connect (ko) |
|
pair< ko, datagram * > | recv4x (datagram *d) |
|
pair< ko, datagram * > | recv6 () |
|
ko | init_sock2 (uint32_t host, uint16_t port, bool block) |
|
void | dump (const string &prefix, ostream &os) const |
|
virtual void | dump_all (const string &prefix, ostream &os) const |
|
string | refdata () const |
|
string | endpoint () const |
|
virtual ko | send1 (datagram *) |
|
void | prepare_worker_recv () |
|
void | worker_ended_recv () |
|
void | set_finished () |
|
bool | is_finished () const |
|
void | test_alive () |
|
void | ping () |
|
| client () |
|
| client (Socket sock_) |
|
String | connect0 (String host, int port) |
|
String | connect0 (String host, int port, bool block) |
|
void | disconnect () |
|
bool | connected () |
|
bool | IsConnected () |
|
String | address () |
|
void | ready () |
|
pair< String, datagram > | send_recv3 (datagram d) |
|
pair< String, datagram > | recv6 () |
|
pair< String, datagram > | recv3 () |
|
pair< String, datagram > | recv4 (datagram d) |
|
String | send3 (datagram d) |
|
| client () |
|
| client (Socket sock_) |
|
void | prepare_worker_recv () |
|
void | worker_ended_recv () |
|
void | on_connect (ko err) |
|
ko | connect0 (String host, uint16_t port) |
|
ko | connect0 (String host, uint16_t hport, boolean block) |
|
void | disconnect (uint16_t seq, String reason) |
|
boolean | connected () |
|
String | address () |
|
String | endpoint () |
|
pair< ko, datagram > | recv6 () |
|
pair< ko, datagram > | recv4x (datagram d) |
|
boolean | is_finished () |
|
pair< ko, datagram > | encrypt0 (final datagram d) |
|
pair< ko, datagram > | decrypt0 (final datagram d) |
|
void | dump (String prefix, PrintStream os) |
|
void | test_alive () |
|
void | ping () |
|
ko | send1 (datagram d0) |
|
◆ queue_t
◆ security_level_t
Enumerator |
---|
security_level_ok | |
security_level_disconnect | |
security_level_ban | |
◆ client() [1/6]
us::gov::socket::client::client |
( |
| ) |
|
◆ client() [2/6]
us::gov::socket::client::client |
( |
int |
sock | ) |
|
◆ ~client()
virtual us::gov::socket::client::~client |
( |
| ) |
|
|
virtual |
◆ client() [3/6]
us.gov.socket.client.client |
( |
| ) |
|
|
inline |
◆ client() [4/6]
us.gov.socket.client.client |
( |
Socket |
sock_ | ) |
|
|
inline |
◆ client() [5/6]
us.gov.socket.client.client |
( |
| ) |
|
|
inline |
◆ client() [6/6]
us.gov.socket.client.client |
( |
Socket |
sock_ | ) |
|
|
inline |
◆ address() [1/2]
String us.gov.socket.client.address |
( |
| ) |
|
|
inline |
◆ address() [2/2]
String us.gov.socket.client.address |
( |
| ) |
|
|
inline |
◆ age() [1/2]
static string us::gov::socket::client::age |
( |
chrono::system_clock::time_point |
time | ) |
|
|
static |
◆ age() [2/2]
static string us::gov::socket::client::age |
( |
uint64_t |
msts | ) |
|
|
static |
◆ connect0() [1/6]
ko us::gov::socket::client::connect0 |
( |
const string & |
host, |
|
|
uint16_t |
port, |
|
|
bool |
block |
|
) |
| |
◆ connect0() [2/6]
String us.gov.socket.client.connect0 |
( |
String |
host, |
|
|
int |
port |
|
) |
| |
|
inline |
◆ connect0() [3/6]
String us.gov.socket.client.connect0 |
( |
String |
host, |
|
|
int |
port, |
|
|
bool |
block |
|
) |
| |
|
inline |
◆ connect0() [4/6]
ko us.gov.socket.client.connect0 |
( |
String |
host, |
|
|
uint16_t |
hport, |
|
|
boolean |
block |
|
) |
| |
|
inline |
References activity, activity_recv, addr, called_disconnect, finished, finished_reason, KO_10100, KO_58961, KO_83911, KO_83912, last_test_alive, us.ok, on_connect(), since, sock, and us::gov::socket::datagram.timeout.
◆ connect0() [5/6]
ko us.gov.socket.client.connect0 |
( |
String |
host, |
|
|
uint16_t |
port |
|
) |
| |
|
inline |
◆ connect0() [6/6]
ko us::gov::socket::client::connect0 |
( |
uint32_t |
host, |
|
|
uint16_t |
port, |
|
|
bool |
block |
|
) |
| |
◆ connected() [1/3]
bool us.gov.socket.client.connected |
( |
| ) |
|
|
inline |
◆ connected() [2/3]
boolean us.gov.socket.client.connected |
( |
| ) |
|
|
inline |
◆ connected() [3/3]
bool us::gov::socket::client::connected |
( |
| ) |
const |
|
inline |
◆ decrypt0() [1/2]
◆ decrypt0() [2/2]
◆ disconnect() [1/3]
void us.gov.socket.client.disconnect |
( |
| ) |
|
|
inline |
◆ disconnect() [2/3]
virtual void us::gov::socket::client::disconnect |
( |
uint16_t |
seq, |
|
|
const string & |
reason |
|
) |
| |
|
virtual |
◆ disconnect() [3/3]
void us.gov.socket.client.disconnect |
( |
uint16_t |
seq, |
|
|
String |
reason |
|
) |
| |
|
inline |
◆ dump() [1/2]
void us::gov::socket::client::dump |
( |
const string & |
prefix, |
|
|
ostream & |
os |
|
) |
| const |
◆ dump() [2/2]
void us.gov.socket.client.dump |
( |
String |
prefix, |
|
|
PrintStream |
os |
|
) |
| |
|
inline |
◆ dump_all()
virtual void us::gov::socket::client::dump_all |
( |
const string & |
prefix, |
|
|
ostream & |
os |
|
) |
| const |
|
inlinevirtual |
◆ dump_d()
void us.gov.socket.client.dump_d |
( |
String |
prefix, |
|
|
datagram |
d, |
|
|
String |
addr |
|
) |
| |
|
inlineprivate |
◆ encrypt0() [1/2]
◆ encrypt0() [2/2]
◆ endpoint() [1/6]
String us.gov.socket.client.endpoint |
( |
| ) |
|
|
inline |
◆ endpoint() [2/6]
string us::gov::socket::client::endpoint |
( |
| ) |
const |
◆ endpoint() [3/6]
static string us::gov::socket::client::endpoint |
( |
const pair< uint32_t, uint16_t > & |
ip | ) |
|
|
static |
◆ endpoint() [4/6]
static String us.gov.socket.client.endpoint |
( |
String |
a, |
|
|
uint16_t |
p |
|
) |
| |
|
inlinestatic |
◆ endpoint() [5/6]
static String us.gov.socket.client.endpoint |
( |
uint32_t |
a, |
|
|
uint16_t |
p |
|
) |
| |
|
inlinestatic |
◆ endpoint() [6/6]
static string us::gov::socket::client::endpoint |
( |
uint32_t |
addr, |
|
|
uint16_t |
port |
|
) |
| |
|
static |
◆ host2addr()
static uint32_t us::gov::socket::client::host2addr |
( |
const string & |
host | ) |
|
|
static |
◆ init_sock2()
ko us::gov::socket::client::init_sock2 |
( |
uint32_t |
host, |
|
|
uint16_t |
port, |
|
|
bool |
block |
|
) |
| |
◆ ip4_decode() [1/2]
static string us::gov::socket::client::ip4_decode |
( |
uint32_t |
addr | ) |
|
|
static |
◆ ip4_decode() [2/2]
static String us.gov.socket.client.ip4_decode |
( |
uint32_t |
addr0 | ) |
|
|
inlinestatic |
◆ ip4_encode() [1/2]
static uint32_t us::gov::socket::client::ip4_encode |
( |
const string & |
addr | ) |
|
|
static |
◆ ip4_encode() [2/2]
static uint32_t us.gov.socket.client.ip4_encode |
( |
String |
addr0 | ) |
|
|
inlinestatic |
◆ is_finished() [1/2]
boolean us.gov.socket.client.is_finished |
( |
| ) |
|
|
inline |
◆ is_finished() [2/2]
bool us::gov::socket::client::is_finished |
( |
| ) |
const |
|
inline |
◆ is_valid_ip()
static bool us::gov::socket::client::is_valid_ip |
( |
uint32_t |
| ) |
|
|
static |
◆ is_wan_ip()
static bool us::gov::socket::client::is_wan_ip |
( |
uint32_t |
| ) |
|
|
static |
◆ IsConnected()
bool us.gov.socket.client.IsConnected |
( |
| ) |
|
|
inline |
◆ on_connect() [1/2]
void us.gov.socket.client.on_connect |
( |
ko |
err | ) |
|
|
inline |
◆ on_connect() [2/2]
virtual void us::gov::socket::client::on_connect |
( |
ko |
| ) |
|
|
virtual |
◆ parse_endpoint() [1/2]
static pair<ko,pair<string,uint16_t> > us::gov::socket::client::parse_endpoint |
( |
const string & |
ipport | ) |
|
|
static |
◆ parse_endpoint() [2/2]
static pair<ko, pair<String,Short> > us.gov.socket.client.parse_endpoint |
( |
String |
ipport | ) |
|
|
inlinestatic |
◆ ping() [1/2]
void us::gov::socket::client::ping |
( |
| ) |
|
◆ ping() [2/2]
void us.gov.socket.client.ping |
( |
| ) |
|
|
inline |
◆ prepare_worker_recv() [1/2]
void us::gov::socket::client::prepare_worker_recv |
( |
| ) |
|
◆ prepare_worker_recv() [2/2]
void us.gov.socket.client.prepare_worker_recv |
( |
| ) |
|
|
inline |
◆ raddress()
pair<uint32_t,uint16_t> us::gov::socket::client::raddress |
( |
| ) |
const |
◆ ready()
void us.gov.socket.client.ready |
( |
| ) |
|
|
inline |
◆ recv3()
◆ recv4()
◆ recv4x() [1/2]
◆ recv4x() [2/2]
References activity, activity_recv, busyled_recv, us.gov.socket.client.pair< f, s >.first, us.ko.is_ko(), us.ok, us::gov::socket::busyled_t.reset(), us.gov.socket.client.pair< f, s >.second, us::gov::socket::busyled_t.set(), and sock.
◆ recv6() [1/3]
◆ recv6() [2/3]
◆ recv6() [3/3]
◆ refdata() [1/2]
String us.gov.socket.client.refdata |
( |
| ) |
|
|
inlinepackage |
◆ refdata() [2/2]
string us::gov::socket::client::refdata |
( |
| ) |
const |
◆ security_level()
◆ send1() [1/2]
virtual ko us::gov::socket::client::send1 |
( |
datagram * |
| ) |
|
|
virtual |
◆ send1() [2/2]
Reimplemented in us::gov::cli::rpc_api.
References activity, us::gov::socket::datagram.decode_service(), encrypt0(), us.gov.socket.client.pair< f, s >.first, us.ko.is_ko(), us.ok, us.gov.socket.client.pair< f, s >.second, us::gov::socket::queue_t.send(), sendq, and sendref.
◆ send3()
String us.gov.socket.client.send3 |
( |
datagram |
d | ) |
|
|
inline |
◆ send_recv3()
◆ set_finished() [1/2]
void us::gov::socket::client::set_finished |
( |
| ) |
|
◆ set_finished() [2/2]
void us.gov.socket.client.set_finished |
( |
| ) |
|
|
inlinepackage |
◆ test_alive() [1/2]
void us::gov::socket::client::test_alive |
( |
| ) |
|
◆ test_alive() [2/2]
void us.gov.socket.client.test_alive |
( |
| ) |
|
|
inline |
◆ worker_ended_recv() [1/2]
void us::gov::socket::client::worker_ended_recv |
( |
| ) |
|
◆ worker_ended_recv() [2/2]
void us.gov.socket.client.worker_ended_recv |
( |
| ) |
|
|
inline |
◆ activity [1/2]
atomic<uint64_t> us::gov::socket::client::activity |
◆ activity [2/2]
AtomicLong us.gov.socket.client.activity =new AtomicLong(0L) |
|
package |
◆ activity_recv [1/2]
chrono::system_clock::time_point us::gov::socket::client::activity_recv |
◆ activity_recv [2/2]
long us.gov.socket.client.activity_recv |
|
package |
◆ addr
String us.gov.socket.client.addr |
|
private |
◆ address
uint32_t us::gov::socket::client::address |
◆ busyled_recv
◆ busyrecv [1/2]
atomic<int> us::gov::socket::client::busyrecv {0} |
◆ busyrecv [2/2]
AtomicInteger us.gov.socket.client.busyrecv =new AtomicInteger(0) |
|
package |
◆ called_disconnect [1/2]
bool us.gov.socket.client.called_disconnect = false |
|
private |
◆ called_disconnect [2/2]
boolean us.gov.socket.client.called_disconnect =false |
|
package |
◆ finished [1/2]
atomic<bool> us::gov::socket::client::finished {false} |
◆ finished [2/2]
AtomicBoolean us.gov.socket.client.finished =new AtomicBoolean(false) |
|
package |
◆ finished_reason [1/2]
pair<uint16_t, string> us::gov::socket::client::finished_reason |
◆ finished_reason [2/2]
pair<uint16_t, String> us.gov.socket.client.finished_reason =new pair<uint16_t, String>(new uint16_t(0), "") |
|
package |
◆ KO_10100 [1/2]
const char * us::gov::socket::client::KO_10100 |
|
static |
◆ KO_10100 [2/2]
final ko us.gov.socket.client.KO_10100 =new ko("KO 10100 Unreachable host.") |
|
static |
◆ KO_20190 [1/2]
const char * us::gov::socket::client::KO_20190 |
|
static |
◆ KO_20190 [2/2]
final ko us.gov.socket.client.KO_20190 =new ko("KO 20190 Invalid endpoint port.") |
|
static |
◆ KO_20191 [1/2]
const char * us::gov::socket::client::KO_20191 |
|
static |
◆ KO_20191 [2/2]
final ko us.gov.socket.client.KO_20191 =new ko("KO 20191 Invalid endpoint host.") |
|
static |
◆ KO_58961 [1/2]
const char * us::gov::socket::client::KO_58961 |
|
static |
◆ KO_58961 [2/2]
final ko us.gov.socket.client.KO_58961 =new ko("KO 58961 Invalid port.") |
|
static |
◆ KO_60541
const char * us::gov::socket::client::KO_60541 |
|
static |
◆ KO_7190
const char* us::gov::socket::client::KO_7190 |
|
static |
◆ KO_83911
final ko us.gov.socket.client.KO_83911 =new ko("KO 83911 IO Exception.") |
|
static |
◆ KO_83912
final ko us.gov.socket.client.KO_83912 =new ko("KO 83912 Exception.") |
|
static |
◆ last_test_alive [1/2]
chrono::system_clock::time_point us::gov::socket::client::last_test_alive |
◆ last_test_alive [2/2]
long us.gov.socket.client.last_test_alive |
|
package |
◆ parent
server* us::gov::socket::client::parent {nullptr} |
◆ port
uint16_t us::gov::socket::client::port |
◆ prev_uid
long us.gov.socket.client.prev_uid =0 |
|
static |
◆ remoteEndPoint
◆ sendq [1/2]
queue_t* us::gov::socket::client::sendq {nullptr} |
◆ sendq [2/2]
◆ sendref [1/2]
atomic<int> us::gov::socket::client::sendref {0} |
◆ sendref [2/2]
AtomicInteger us.gov.socket.client.sendref =new AtomicInteger(0) |
◆ since [1/2]
chrono::system_clock::time_point us::gov::socket::client::since |
◆ since [2/2]
long us.gov.socket.client.since |
◆ sock [1/2]
Socket us::gov::socket::client::sock =null |
Referenced by address(), client(), us::gov::cli::rpc_api::connect(), connect0(), connected(), disconnect(), IsConnected(), us::gov::auth::peer_t::peer_t(), us::gov::id::peer_t::peer_t(), us::gov::socket::peer_t::peer_t(), recv3(), recv4(), recv4x(), send3(), and us.wallet.rpc_api::sendrecv().
◆ sock [2/2]
Socket us.gov.socket.client.sock =null |
◆ timeout
struct timeval us::gov::socket::client::timeout |
|
static |
◆ uid
long us.gov.socket.client.uid =++prev_uid |
The documentation for this class was generated from the following files: