Assemble useful client-server communication
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user