2014-04-26 09:18:56 +00:00
|
|
|
package ICCC
|
|
|
|
|
2014-10-19 17:19:11 +00:00
|
|
|
import (
|
|
|
|
"container/list"
|
|
|
|
"github.com/SommerEngineering/Ocean/Log"
|
|
|
|
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
|
|
|
"github.com/SommerEngineering/Ocean/Tools"
|
|
|
|
)
|
2014-04-26 09:18:56 +00:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Start init of ICCC.`)
|
|
|
|
defer Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Done init ICCC.`)
|
|
|
|
|
|
|
|
cacheListenerDatabase = list.New()
|
|
|
|
listeners = make(map[string]func(data map[string][]string))
|
|
|
|
|
2014-06-08 09:35:01 +00:00
|
|
|
// Using the local IP address and NOT the configuration "OceanHostnameAndPort":
|
|
|
|
correctAddressWithPort = Tools.LocalIPAddressAndPort()
|
2014-04-26 09:18:56 +00:00
|
|
|
|
|
|
|
initDB()
|
|
|
|
registerHost2Database()
|
|
|
|
}
|