Joedb 10.2.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
joedb::Server_Client Class Reference

#include <joedb/concurrency/Server_Client.h>

Inheritance diagram for joedb::Server_Client:
Inheritance graph
[legend]
Collaboration diagram for joedb::Server_Client:
Collaboration graph
[legend]

Public Member Functions

 Server_Client (Channel &channel, std::ostream *log=nullptr, std::chrono::milliseconds keep_alive_interval=std::chrono::seconds(0))
 
int64_t get_session_id () const
 
Thread_Safe< Channel & > & get_channel ()
 
void ping ()
 
 ~Server_Client ()
 

Protected Member Functions

void download (Async_Writer &writer, Lock< Channel & > &lock, int64_t size) const
 

Protected Attributes

Thread_Safe< Channel & > channel
 
std::ostream * log
 
bool connected
 
Buffer< 13 > buffer
 
int64_t session_id
 
bool pullonly_server
 
int64_t server_checkpoint
 

Friends

class Server_File
 

Detailed Description

Definition at line 17 of file Server_Client.h.

Constructor & Destructor Documentation

◆ Server_Client()

joedb::Server_Client::Server_Client ( Channel channel,
std::ostream *  log = nullptr,
std::chrono::milliseconds  keep_alive_interval = std::chrono::seconds(0) 
)
Parameters
keep_alive_intervala background thread will send a ping to the server at this interval. Setting this parameter to zero disables the keep-alive background thread.

Definition at line 137 of file Server_Client.cpp.

◆ ~Server_Client()

joedb::Server_Client::~Server_Client ( )

Definition at line 180 of file Server_Client.cpp.

Member Function Documentation

◆ download()

void joedb::Server_Client::download ( Async_Writer writer,
Lock< Channel & > &  lock,
int64_t  size 
) const
protected

Definition at line 114 of file Server_Client.cpp.

◆ get_channel()

Thread_Safe< Channel & > & joedb::Server_Client::get_channel ( )
inline

Definition at line 63 of file Server_Client.h.

◆ get_session_id()

int64_t joedb::Server_Client::get_session_id ( ) const
inline

Definition at line 62 of file Server_Client.h.

◆ ping()

void joedb::Server_Client::ping ( )

Definition at line 26 of file Server_Client.cpp.

Friends And Related Symbol Documentation

◆ Server_File

friend class Server_File
friend

Definition at line 19 of file Server_Client.h.

Member Data Documentation

◆ buffer

Buffer<13> joedb::Server_Client::buffer
mutableprotected

Definition at line 36 of file Server_Client.h.

◆ channel

Thread_Safe<Channel&> joedb::Server_Client::channel
mutableprotected

Definition at line 32 of file Server_Client.h.

◆ connected

bool joedb::Server_Client::connected
protected

Definition at line 34 of file Server_Client.h.

◆ log

std::ostream* joedb::Server_Client::log
protected

Definition at line 33 of file Server_Client.h.

◆ pullonly_server

bool joedb::Server_Client::pullonly_server
protected

Definition at line 39 of file Server_Client.h.

◆ server_checkpoint

int64_t joedb::Server_Client::server_checkpoint
protected

Definition at line 40 of file Server_Client.h.

◆ session_id

int64_t joedb::Server_Client::session_id
protected

Definition at line 38 of file Server_Client.h.


The documentation for this class was generated from the following files: