Reconnect delay and automatic host

Now it waits three seconds before requesting a new client in order to
read the message, and the host address is obtained automatically with
`location.host`.