No title

1
2
3
4
5
6
7
8
connectMany :: (HasAddressInfo f,Storable (SocketAddress f),Type t, Protocol p) =>
  [Uri] -> ([NetResources f t p] -> F Command a) -> F Command a
connectMany hosts f = loop hosts []
  where loop [] acc = f acc
        loop (Uri host port:rest) acc =
          connect (IPv4.encode host) (Just port) $ \sockt ->
            loop rest (sockt:acc)