wait will attempt to connect to the given host and port repeated every 10 milliseconds until it is successful. It will throw an IOError if the host cannot be resolved.
A typical use case is to call wait in test code to wait for a server to start before trying to connect. For example:
void $ forkIO $ Warp.run 7000 app
-- Wait for the server to start listening on the socket
wait "127.0.0.1" 7000
-- Communicate with the server
If you would like to control the delay or understand how many connection attempts were made use waitWith.
Since 0.0.0.1