From b912a7a024161b79d838c37bd1422172dd157030 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Tue, 17 Oct 2017 12:30:51 -0600 Subject: [PATCH] Update --- test/client.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/client.go b/test/client.go index 9c03166..e239fc1 100644 --- a/test/client.go +++ b/test/client.go @@ -8,6 +8,7 @@ import ( "time" ) +// runClient spawns threads for parallel uplink/downlink via TCP func runClient(connectionType string, codePhrase string) { var wg sync.WaitGroup wg.Add(numberConnections) @@ -27,17 +28,23 @@ func runClient(connectionType string, codePhrase string) { if connectionType == "s" { message = receiveMessage(connection) fmt.Println(message) - // TODO: Write data from file // Send file name sendMessage("filename", connection) // Send file size time.Sleep(3 * time.Second) sendMessage("filesize", connection) + // TODO: Write data from file + + // TODO: Release from connection pool + // POST /release } else { - // TODO: Pull data and write to file fileName := receiveMessage(connection) fileSize := receiveMessage(connection) fmt.Println(fileName, fileSize) + // TODO: Pull data and write to file + + // TODO: Release from connection pool + // POST /release } }(id)