#include <SphynxClient.hpp>
List of all members.
Public Member Functions |
| | Client () |
| bool | Connect (const char *hostname, Port port) |
| bool | Connect (const NetAddr &addr) |
| void | Disconnect () |
| bool | SetServerKey (ThreadPoolLocalStorage *tls, const void *server_key, int key_bytes, const char *session_key) |
| virtual | ~Client () |
Protected Member Functions |
| bool | IsConnected () |
| virtual void | OnClose ()=0 |
| virtual void | OnConnect (ThreadPoolLocalStorage *tls)=0 |
| virtual void | OnConnectFail ()=0 |
| virtual void | OnDisconnect ()=0 |
| virtual void | OnMessage (ThreadPoolLocalStorage *tls, BufferStream msg, u32 bytes)=0 |
| virtual void | OnTick (ThreadPoolLocalStorage *tls, u32 now)=0 |
| virtual void | OnTimestampDeltaUpdate (u32 rtt, s32 delta) |
Protected Attributes |
| AuthenticatedEncryption | _auth_enc |
| bool | _connected |
| u32 | _last_recv_tsc |
| u32 | _last_send_mstsc |
| NetAddr | _server_addr |
Private Member Functions |
| virtual void | OnRead (ThreadPoolLocalStorage *tls, const NetAddr &src, u8 *data, u32 bytes) |
| bool | OnResolve (const char *hostname, const NetAddr *array, int array_length) |
| void | OnUnreachable (const NetAddr &src) |
| virtual void | OnWrite (u32 bytes) |
| bool | PostHello () |
| virtual bool | PostPacket (u8 *buffer, u32 buf_bytes, u32 msg_bytes, u32 skip_bytes) |
| bool | ThreadFunction (void *param) |
Private Attributes |
| u8 | _cached_challenge [CHALLENGE_BYTES] |
| KeyAgreementInitiator | _key_agreement_initiator |
| WaitableFlag | _kill_flag |
| u8 | _server_public_key [PUBLIC_KEY_BYTES] |
| char | _session_key [SESSION_KEY_BYTES] |
Static Private Attributes |
| static const int | CLIENT_THREAD_KILL_TIMEOUT = 10000 |
| static const int | CONNECT_TIMEOUT = 6000 |
| static const int | HANDSHAKE_TICK_RATE = 100 |
| static const int | INITIAL_HELLO_POST_INTERVAL = 200 |
| static const u32 | MTU_PROBE_INTERVAL = 8000 |
| static const int | SESSION_KEY_BYTES = 32 |
Detailed Description
Definition at line 45 of file SphynxClient.hpp.
Constructor & Destructor Documentation
| cat::sphynx::Client::Client |
( |
| ) |
|
| virtual cat::sphynx::Client::~Client |
( |
| ) |
[virtual] |
Member Function Documentation
| bool cat::sphynx::Client::Connect |
( |
const char * |
hostname, |
|
|
Port |
port |
|
) |
| |
| bool cat::sphynx::Client::Connect |
( |
const NetAddr & |
addr | ) |
|
| void cat::sphynx::Client::Disconnect |
( |
| ) |
|
| bool cat::sphynx::Client::IsConnected |
( |
| ) |
[inline, protected] |
| virtual void cat::sphynx::Client::OnClose |
( |
| ) |
[protected, pure virtual] |
| virtual void cat::sphynx::Client::OnConnectFail |
( |
| ) |
[protected, pure virtual] |
| virtual void cat::sphynx::Client::OnDisconnect |
( |
| ) |
[protected, pure virtual] |
| bool cat::sphynx::Client::OnResolve |
( |
const char * |
hostname, |
|
|
const NetAddr * |
array, |
|
|
int |
array_length |
|
) |
| [private] |
| virtual void cat::sphynx::Client::OnTimestampDeltaUpdate |
( |
u32 |
rtt, |
|
|
s32 |
delta |
|
) |
| [inline, protected, virtual] |
| void cat::sphynx::Client::OnUnreachable |
( |
const NetAddr & |
src | ) |
[private, virtual] |
| virtual void cat::sphynx::Client::OnWrite |
( |
u32 |
bytes | ) |
[private, virtual] |
| bool cat::sphynx::Client::PostHello |
( |
| ) |
[private] |
| virtual bool cat::sphynx::Client::PostPacket |
( |
u8 * |
buffer, |
|
|
u32 |
buf_bytes, |
|
|
u32 |
msg_bytes, |
|
|
u32 |
skip_bytes |
|
) |
| [private, virtual] |
| bool cat::sphynx::Client::SetServerKey |
( |
ThreadPoolLocalStorage * |
tls, |
|
|
const void * |
server_key, |
|
|
int |
key_bytes, |
|
|
const char * |
session_key |
|
) |
| |
| bool cat::sphynx::Client::ThreadFunction |
( |
void * |
param | ) |
[private, virtual] |
Member Data Documentation
The documentation for this class was generated from the following file: