47 std::string serialDevice,
49 unsigned short nverbose)
A simple thread-safe wrapper for select()
Responsible for orchestrating the high-level life cycle of a daemon-side NCP server and multiplexing ...
IOWatch socketChannelWatch_
Used to watch all active SocketChannel instances (stored in socketChannels_) to see if they're readab...
void cancel()
Mark the session as cancelled.
std::string serialDevice_
std::mutex socketChannelLock_
pthread_t sessionMainThreadId_
void wait()
Wait for the session to terminate.
friend void check_for_new_socket_connection(NCPSession *session)
NCPSession(int portNumber, int baudRate, std::string host, std::string serialDevice, bool autoexit, unsigned short nverbose)
friend void * link_thread(void *arg)
std::vector< SocketChannel * > socketChannels_
int start()
Creates and manages all the threads necessary to run a full session for communicating with a Psion an...
friend void * socket_connection_polling_thread(void *arg)
Responsible for driving the SocketChannel instances (incoming TCP connections) by means of SocketChan...
friend void * ncp_session_main_thread(void *arg)
A class for dealing with sockets.