Now we create and connect the socket. The list of endpoints obtained above
may contain both IPv4 and IPv6 endpoints, so we need to try each of them
until we find one that works. This keeps the client program independent of
a specific IP version. The asio::connect() function does this for us automatically.

The connection is open. All we need to do now is read the response from the
daytime service.

We use a boost::array to hold the received data. The asio::buffer()
function automatically determines the size of the array to help prevent buffer
overruns. Instead of a boost::array,
we could have used a char[]
or std::vector.