Add hostname_len to connection, rather than using strlen()