Implemented physics interpolation
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user