cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Trouble getting started... (couldn't connect to host)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 8 Sep 2010 22:19:39 +0200 (CEST)

On Wed, 8 Sep 2010, Sara wrote:

> curl_easy_setopt(curl, CURLOPT_URL, "google.com");

Note that this isn't really a legal URL and only works because libcurl guesses
what you meant with this...

> I can compile ok, but when I run the program I get this output:

First a control question: if you run the normal curl tool like "curl -v
google.com", does that work?

> * About to connect() too google.com port 80 (#0)
> * couldn't connect to host

Hm, that looks a bit unexpected. I expected a line like "Trying
74.125.79.147..." in between those two lines!

> I have tried to sniff the TCP/IP-traffic using SmartSniff, but nothing is
> detected while running my program.

*nothing* ? Not even a DNS resolve?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-08