host and port resolution

it only tries to resolve given host, and attemt to connect when port is
specified
no error handling, just avoiding premature exiting