Class Server#

Class Documentation#

class Server#

server class for slicecam daemon

This class defines what is needed by the slicecam daemon server.

Public Functions

inline Server()#

class constructor

inline ~Server()#

class deconstructor cleans up on exit

void doit(Network::TcpSocket &sock)#

the workhorse of each thread connetion

void exit_cleanly()#

exit

long configure_slicecamd()#

read and apply the configuration file

void handle_signal(int signo)#

Public Members

int nbport#

non-blocking port

int blkport#

blocking port

int asyncport#

asynchronous message port

std::string asyncgroup#

asynchronous multicast group

std::atomic<int> cmd_num#

keep a running tally of number of commands received by slicecamd

Common::CorrIdCache corr_cache#

dedup cache for tagged inter-daemon commands

Config config#

create a Config object for reading the configuration file

Interface interface#

create an Interface object for the slicecam hardware

std::mutex conn_mutex#

mutex to protect against simultaneous access to Accept()

Public Static Functions

static void new_log_day(std::string logpath)#

creates a new logbook each day

static void block_main(Slicecam::Server &slicecam, Network::TcpSocket sock)#

main function for blocking connection thread

static void thread_main(Slicecam::Server &slicecam, Network::TcpSocket sock)#

main function for all non-blocked threads

static void async_main(Slicecam::Server &slicecam, Network::UdpSocket sock)#

asynchronous message sending thread

static inline void signal_handler(int signo)#

Public Static Attributes

static Server *instance#