meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

peerhood:daemon [2011/09/02 12:05] (current)
Line 1: Line 1:
 +In the main of the daemon:
 +
 +==CDaemon()==
 +-New Instance of the deamon
 +
 +'''​CDeviceStorage::​GetInstance'''​
 +- Make sure that there is only one instance of daemon running
 +
 +'''​getpid()'''​
 +- Daemon pid is used internally for communication
 +
 +==MakeDaemon()==
 +- This finally creates the daemon process
 +
 +'''​CreateLocalSocket()'''​
 +- Socket for the library
 +
 +'''​LoadPlugins()'''​
 +- Loads the necessary plugins (should we be able to define what we want to be loaded)
 +
 +===StartPlugins()===
 +- Starts the communication interfaces, one at the time
 +
 +'''​Plugin.Start()'''​
 +- Runs start function for each Plugin loaded
 +
 +- Creates a thread (threadstarter) for inquiring devices in the network(s)
 +
 +'''​Plugin.Advert()'''​
 +- Runs advertisment function Advert() for each Plugin loaded
 +
 +- Adds service into the peerhood database
 +
 +-Creates a thread (advertstarter) for advertisement purposes. Whenever service request arrives, this thread answers to that and tells what services peerhood offers (has registered).
 +
 +==daemon.Run()==
 +
 +- Main loop of the PeerHood Daemon. Adds clients and performs commands of the clients (GET_DEVICELIST,​ INSERT_SERVICE,​ REMOVE_SERVICE,​ GET_LOCAL_SERVICELIST). Other functionalities can be added later on.