Changement pour n'accepter qu'un seul client

This commit is contained in:
2022-02-20 11:41:41 +01:00
parent f58890ead1
commit 815da08c8d
2 changed files with 14 additions and 18 deletions

View File

@@ -5,19 +5,18 @@ import (
)
const (
MULTICAST_ADDRESS = "226.0.0.1:42500"
MULTICAST_SECOND = 10
MULTICAST_ADDRESS = "226.66.66.1:42500"
MULTICAST_SECOND = 10 // TODO : Changer en 30 secondes
UNICAST_ADDRESS = "0.0.0.0:58000"
)
func main() {
println("StorBackEnd started !")
//multicast := network.CreateClientMulticast(MULTICAST_ADDRESS, MULTICAST_SECOND)
multicast := network.CreateClientMulticast(MULTICAST_ADDRESS, MULTICAST_SECOND)
go multicast.Run()
/* go */
//multicast.Run()
server := network.ServerUnicast{Network: "tcp", Address: "0.0.0.0:58000"}
server := network.ServerUnicast{Network: "tcp", Address: UNICAST_ADDRESS}
server.Run()
}