title: how does asterisk [ or similar console application ] achieve "asterisk -r" console
body: <p>Anyone who is familiar with <a href="http://www.asterisk.org/" rel="nofollow">asterisk</a> knows you can connect to running asterisk application by using "<code>asterisk -r</code>" command and looking at what asterisk is up to.</p>
  
  <p>My question is using c/c++ , how is it achieved? what headers / libraries are used? I have been searching around for long but can not find anything relevant.</p>
  
  <p>I have been tasked with developing an app which runs as a daemon and i think it would be good idea to be able to interact with him in similar fashion of asterisk. Currently I am running this in a screen <a href="https://wiki.archlinux.org/index.php/GNU_Screen" rel="nofollow">https://wiki.archlinux.org/index.php/GNU_Screen</a> but would like to change that.</p>