diff --git a/mp3/Client/client.go b/mp3/Client/client.go index f67e0408c8d1efb4b1dd6d4575ffd2cd2b2407f7..564327a578d1bd3954f8704add5ecdb2ef18e57f 100644 --- a/mp3/Client/client.go +++ b/mp3/Client/client.go @@ -173,7 +173,8 @@ func main() { response := <-client.ResponseChan if response.Result { 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") } else { fmt.Println("ABORTED") @@ -223,6 +224,8 @@ func main() { fmt.Println("NOT FOUND, ABORTED") return } + } else if substrings[0] == "PRINT" { + go client.send_request(substrings[0], substrings[1], 0) } } }