On Wed Jan 28 2015 at 9:18:47 Péter Szilágyi wrote:

until you look at the network usage: x1 secs download, y1 secs upload,
x2 secs download, y2 secs upload.
Run the upload and download in separate goroutines, ie. concurrently. Feed
the upload reading from a channel the download writes to chunks of data.

It's simple. Wrapping it into a stdlib fn is not worth of it, IMO.
Additionally, such wrapper has no chance to handle network errors in any
intelligent/task specific way* which the roll-your-own dozen-or-so lines

(*) In this case like reestablishing a broken network connection and
continuing from the last good R/W position etc on either/both side(s)


You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 22 | next ›
Discussion Overview
groupgolang-nuts @
postedJan 28, '15 at 8:18a
activeJan 30, '15 at 1:02p



site design / logo © 2021 Grokbase