Suggested name: rio_tcp_establish(). It should take a host name and a port. The host name is resolved to a list of A records. It should try to connect to each A record in order (randomly) until all records have been exhausted. The function should not return unless a tcp connection has been established (using rio_tcp_conn_wait).