|
Communication Call Functions
|
bet | 29/32 | Sana | 22.07.2021 | Hajmi | 0,89 Mb. | | #15652 |
6.4.3 Communication Call Functions
The first sets of functions below are simple functions which create or close data and control sockets for the application and are self explanatory.
openControlConnection()
createRecivingSocket()
createSendingSocket()
createServerSocket()
closeConnection()
The next set of functions deal with a particular aspect of signalling and control of the call channels;
comms_listen() thread opens up a listing channel and listens for a incoming connection. When a connection is made the user interface is notified and if the user choices to accept the connection the comms_incall functions is called, on the other hand if the user choices to reject the call the subsystem resumes listening.
comms_incall() opens the two data channels and setups and starts each subsystem processing the recorded and playback audio, once the hang up signal is received the function terminates the call and resumes the listening thread.
comms_makecall() opens a connection with the machine and if an accept signal is received calls the comms_incall function to setup and carry out the call.
comms_uithread() thread waits for a signal, which once received processes messages from the user interface and sends them to the current running thread such as the listening thread.
comms_senduicommand() received the user interface messages and signals comms_uithread() that a messages has arrived.
|
| |