Implemented physics interpolation

This commit is contained in:
2024-02-27 21:05:55 +01:00
parent ca7fa120ea
commit 489a14061a
23 changed files with 226 additions and 68 deletions

View File

@ -6,6 +6,7 @@ import (
"encoding/json"
"flag"
"fmt"
"math/rand"
"net"
"sync"
"time"
@ -49,7 +50,8 @@ func udpClient(wg *sync.WaitGroup, id int) {
defer conn.Close()
loginRequest := [2]string{fmt.Sprintf("user%d", id+1), sha256Text("password")}
username := fmt.Sprintf("user%d", id+1)
loginRequest := [2]string{username, sha256Text("password")}
data, err := json.Marshal(loginRequest)
if err != nil {
@ -69,6 +71,10 @@ func udpClient(wg *sync.WaitGroup, id int) {
return
}
if rand.Float32() > 0.5 {
conn.Write([]byte{13})
}
time.Sleep(*sleepTime)
}
}