Merge branch 'jeremi' into dev
This commit is contained in:
11
cmd/main.go
11
cmd/main.go
@@ -7,6 +7,7 @@ import (
|
||||
"StoreBackEnd/pkg/protocol/repository"
|
||||
"StoreBackEnd/pkg/protocol/rules/readers"
|
||||
"StoreBackEnd/pkg/protocol/rules/writers"
|
||||
"StoreBackEnd/pkg/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -15,6 +16,7 @@ const (
|
||||
)
|
||||
|
||||
func main() {
|
||||
utils.NetworkLister() // TODO REMOVE
|
||||
println("StoreBackEnd started !")
|
||||
|
||||
// Loading App config
|
||||
@@ -24,8 +26,9 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
println("Multicast Address : " + appConfig.MulticastAddress)
|
||||
println("StoreBacked Domain : " + appConfig.Domain)
|
||||
println(" - Multicast Network Interface : " + appConfig.MulticastNetworkInterface)
|
||||
println(" - Multicast Address : " + appConfig.MulticastAddress)
|
||||
println(" - StoreBacked Domain : " + appConfig.Domain)
|
||||
|
||||
protocolRepository := repository.CreateProtocolRepository()
|
||||
|
||||
@@ -56,7 +59,9 @@ func main() {
|
||||
protocolRepository.AddReader(&sendFileRule)
|
||||
|
||||
// Create a Multicast Client & run it
|
||||
multicast := network.CreateClientMulticast(appConfig.MulticastAddress, appConfig.Domain, appConfig.UnicastPort, time.Duration(appConfig.MulticastSecond), protocolRepository)
|
||||
multicast := network.CreateClientMulticast(
|
||||
appConfig.MulticastNetworkInterface, appConfig.MulticastAddress, appConfig.Domain,
|
||||
appConfig.UnicastPort, time.Duration(appConfig.MulticastSecond), protocolRepository)
|
||||
go multicast.Run()
|
||||
|
||||
requestManager := managers.RequestManager{Repository: protocolRepository}
|
||||
|
||||
Reference in New Issue
Block a user