TCP servers setup, connection handling and first command (QUIT).
This commit is contained in:
parent
46f14be481
commit
e1b71e5d44
@ -8,6 +8,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
// local
|
// local
|
||||||
|
"develop.pztrn.name/gonews/gonews/commands"
|
||||||
|
"develop.pztrn.name/gonews/gonews/configuration"
|
||||||
"develop.pztrn.name/gonews/gonews/eventer"
|
"develop.pztrn.name/gonews/gonews/eventer"
|
||||||
"develop.pztrn.name/gonews/gonews/networker"
|
"develop.pztrn.name/gonews/gonews/networker"
|
||||||
)
|
)
|
||||||
@ -15,7 +17,9 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
log.Println("Starting gonewsd...")
|
log.Println("Starting gonewsd...")
|
||||||
|
|
||||||
|
configuration.Initialize()
|
||||||
eventer.Initialize()
|
eventer.Initialize()
|
||||||
|
commands.Initialize()
|
||||||
networker.Initialize()
|
networker.Initialize()
|
||||||
|
|
||||||
eventer.InitializeCompleted()
|
eventer.InitializeCompleted()
|
||||||
|
@ -3,9 +3,16 @@ package networker
|
|||||||
import (
|
import (
|
||||||
// stdlib
|
// stdlib
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
// local
|
||||||
|
"develop.pztrn.name/gonews/gonews/configuration"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Initialize initializes package.
|
// Initialize initializes package.
|
||||||
func Initialize() {
|
func Initialize() {
|
||||||
log.Println("Initializing network connections handler...")
|
log.Println("Initializing network connections handler...")
|
||||||
|
|
||||||
|
for _, iface := range configuration.Cfg.Network {
|
||||||
|
go startServer(iface)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user