Skip to content

Instantly share code, notes, and snippets.

@btc

btc/-

Created January 17, 2015 12:05
Show Gist options
  • Save btc/838f1761622e742e99b8 to your computer and use it in GitHub Desktop.
Save btc/838f1761622e742e99b8 to your computer and use it in GitHub Desktop.
324 // if many conns are found, how do we select? for now, randomly...
325 // this would be an interesting place to test logic that can measure
326 // links (network interfaces) and select properly
327 n := rand.Intn(len(cs))
328 var c *conn
329 for c = range cs {
330 if n == 0 {
331 break
332 }
333 n--
334 }
335
336 return c.NewStream()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment