From 7ee4830f41bef02419e875944ba30f2b3413419d Mon Sep 17 00:00:00 2001
From: owenw2 <owenw2@sp25-cs425-0601.cs.illinois.edu>
Date: Sat, 10 May 2025 09:48:04 -0500
Subject: [PATCH] updated client-side ids

---
 mp3/Client/client.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mp3/Client/client.go b/mp3/Client/client.go
index f67e040..564327a 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)
 		}
 	}
 }
-- 
GitLab