Future waitFor()

Source

Future waitFor() {
  return Future.wait(sockets.map((it) => it.waitFor()).toList());
}