Envoie de l'annonce en multicast fonctionnelle
This commit is contained in:
@@ -2,6 +2,7 @@ package network
|
||||
|
||||
import (
|
||||
"_StorBackEnd/pkg/protocol/repository"
|
||||
"_StorBackEnd/pkg/protocol/rules/writers"
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
@@ -40,8 +41,15 @@ func (cMult ClientMulticast) Run() {
|
||||
return
|
||||
}
|
||||
|
||||
// Fake test
|
||||
cmd, correct := cMult.repository.ExecuteWriter(writers.HelloRuleName, "benja.be", "5078")
|
||||
if !correct {
|
||||
println("Hello rule isn't correct")
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
con.Write([]byte("Hello"))
|
||||
con.Write([]byte(cmd))
|
||||
time.Sleep(time.Second * cMult.second)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"_StorBackEnd/pkg/protocol"
|
||||
"_StorBackEnd/pkg/protocol/managers"
|
||||
"bufio"
|
||||
"fmt"
|
||||
"net"
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
type ServerUnicast struct {
|
||||
Network string
|
||||
Address string
|
||||
ReqManager *protocol.RequestManager
|
||||
ReqManager *managers.RequestManager
|
||||
}
|
||||
|
||||
func (server ServerUnicast) Run() {
|
||||
|
||||
Reference in New Issue
Block a user