Assemble useful client-server communication

This commit is contained in:
2024-06-18 01:03:11 +02:00
parent 762e62614d
commit eccd113e90
2 changed files with 52 additions and 17 deletions

View File

@@ -66,11 +66,8 @@ func main() {
url: "ws://localhost:8080/ws",
}
wsConn.open()
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
for timestamp := range ticker.C {
wsConn.writeMessage(timestamp.String())
for {
log.Printf("zzz...")
time.Sleep(30 * time.Second)
}
}