This is the application that is responsible for listening on the csicq socket and accepting the connection. It is implemented in the files:
The functionality and implementation of the listener are very simple. The procedure contains a standard TCP socket that is set to listen on the csicq port (that has been set to 4040).
We use select() to check for incoming connections and when one arrives, the listener simply accept()s it and provides it as argument to the connection control function. The connection control function is being activated in a separate thread created by the pthread_create() function. After the new thread has been created, the listening application goes on listening.