Envoie de l'annonce en multicast fonctionnelle
This commit is contained in:
@@ -2,8 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"_StorBackEnd/pkg/network"
|
||||
"_StorBackEnd/pkg/protocol"
|
||||
"_StorBackEnd/pkg/protocol/managers"
|
||||
"_StorBackEnd/pkg/protocol/repository"
|
||||
"_StorBackEnd/pkg/protocol/rules/writers"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -14,12 +15,15 @@ const (
|
||||
|
||||
func main() {
|
||||
println("StorBackEnd started !")
|
||||
|
||||
protocolRepository := repository.CreateProtocolRepository()
|
||||
helloRule := writers.CreateHelloRule("")
|
||||
protocolRepository.AddWriter(&helloRule)
|
||||
|
||||
multicast := network.CreateClientMulticast(MULTICAST_ADDRESS, MULTICAST_SECOND, protocolRepository)
|
||||
go multicast.Run()
|
||||
|
||||
requestManager := protocol.RequestManager{Repository: protocolRepository}
|
||||
requestManager := managers.RequestManager{Repository: protocolRepository}
|
||||
|
||||
server := network.ServerUnicast{Network: "tcp", Address: UNICAST_ADDRESS, ReqManager: &requestManager}
|
||||
server.Run()
|
||||
|
||||
Reference in New Issue
Block a user