Skip to content
Snippets Groups Projects
Commit 7ee4830f authored by owenw2's avatar owenw2
Browse files

updated client-side ids

parent 34f978c0
No related branches found
No related tags found
No related merge requests found
...@@ -173,7 +173,8 @@ func main() { ...@@ -173,7 +173,8 @@ func main() {
response := <-client.ResponseChan response := <-client.ResponseChan
if response.Result { if response.Result {
client.Connected = true client.Connected = true
client.Timestamp = time.Now() id, _ := strconv.Atoi(response.Message)
client.Timestamp = time.Now().Add(time.Duration(id) * time.Second)
fmt.Println("OK") fmt.Println("OK")
} else { } else {
fmt.Println("ABORTED") fmt.Println("ABORTED")
...@@ -223,6 +224,8 @@ func main() { ...@@ -223,6 +224,8 @@ func main() {
fmt.Println("NOT FOUND, ABORTED") fmt.Println("NOT FOUND, ABORTED")
return return
} }
} else if substrings[0] == "PRINT" {
go client.send_request(substrings[0], substrings[1], 0)
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment