Class Server

Class Documentation

class Server

server class for the sequencer daemon

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

Public Functions

inline Server()

class constructor

inline ~Server()

class deconstructor cleans up on exit

inline void remove_socket(int id)
void exit_cleanly(void)

exit

long configure_sequencer()

read and apply the configuration file

void doit(Network::TcpSocket &sock)

the workhorse of each thread connetion

void handle_signal(int signo)

Public Members

int nbport

sequencer daemon non-blocking port

int blkport

sequencer daemon blocking port

int asyncport

sequencer daemon asynchronous command port

int messageport

sequencer daemon asynchronous message port

std::string messagegroup

sequencer daemon asynchronous message multicast group

int nonblocking_socket
int blocking_socket
std::atomic<int> cmd_num

keep a running tally of number of commands received by sequencerd

Common::CorrIdCache corr_cache

dedup cache for tagged inter-daemon commands

std::atomic<int> threads_active

number of blocking threads that exist

NumberPool id_pool

creates a number pool

Config config

create a Config object for reading the configuration file

Sequence sequence

create a Sequence object&#8212;this is where the work is done

std::mutex conn_mutex

mutex to protect against simultaneous access to Accept()

std::mutex sock_block_mutex

mutex to protect against simultaneous access to Accept()

std::mutex socklist_mutex

mutex to protect against simultaneous access to socklist

std::map<int, std::shared_ptr<Network::TcpSocket>> socklist

Public Static Functions

static void new_log_day(std::string logpath)

creates a new logbook each day

static void block_main(Sequencer::Server &server, std::shared_ptr<Network::TcpSocket>)

main function for blocking connection thread

static void thread_main(Sequencer::Server &server, std::shared_ptr<Network::TcpSocket> sock)

main function for all non-blocked threads

static void gui_main(Sequencer::Server &server, std::shared_ptr<Network::TcpSocket> sock)

main function for gui threads

static inline void signal_handler(int signo)

Public Static Attributes

static Server *instance