Start commit 22/02/2022
This commit is contained in:
@@ -2,6 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"_StorBackEnd/pkg/network"
|
||||
"_StorBackEnd/pkg/protocol"
|
||||
"_StorBackEnd/pkg/protocol/repository"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -12,11 +14,14 @@ const (
|
||||
|
||||
func main() {
|
||||
println("StorBackEnd started !")
|
||||
protocolRepository := repository.CreateProtocolRepository()
|
||||
|
||||
multicast := network.CreateClientMulticast(MULTICAST_ADDRESS, MULTICAST_SECOND)
|
||||
multicast := network.CreateClientMulticast(MULTICAST_ADDRESS, MULTICAST_SECOND, protocolRepository)
|
||||
go multicast.Run()
|
||||
|
||||
server := network.ServerUnicast{Network: "tcp", Address: UNICAST_ADDRESS}
|
||||
requestManager := protocol.RequestManager{Repository: protocolRepository}
|
||||
|
||||
server := network.ServerUnicast{Network: "tcp", Address: UNICAST_ADDRESS, ReqManager: &requestManager}
|
||||
server.Run()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user