• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is my computer connected to the web?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is my computer connected to the web?


  • Subject: Re: Is my computer connected to the web?
  • From: Lorenzo <email@hidden>
  • Date: Sat, 17 Jan 2004 20:54:16 +0100

Hi,
I use only "stringWithContentsOfURL:" and when I am not connected or that
file doesn't exist, I have to wait so long to get the response. Do you think
there is a Cocoa short way to detect that I am not connected?
I understand the problemes are two, separated.

1) Detect when I am not connected.
2) Detect that the file doesn't exist.

Time ago I used a code that pings a host by its IP, and it works even of FTP
and HTTP protocols (webdav). So, can I use the this code? If yes, how should
I pass the whole pathname of the file and understand quickly that the file
doens't exist? I presume I have to use a thread and tell the user that the
files doens't exist after trying for e.g. 30 second (like Safari uses to
do). Right?


Best Regards
--
Lorenzo
email: email@hidden

> From: Scott Anguish <email@hidden>
> Date: Sat, 17 Jan 2004 01:27:03 -0500
> To: Lorenzo <email@hidden>
> Cc: email@hidden
> Subject: Re: Is my computer connected to the web?
>
>
> On Jan 16, 2004, at 5:58 PM, Lorenzo wrote:
>
>> Any time I try to get a file from the web
>> and the line is slow or I am not connected, I have to wait for a
>> minute just
>> to know that the file is not available or that the connection doesn't
>> work
>> at all.
>>
>> How can I know immediately whether my computer is not connected to the
>> web?
>>
>>
>
> how are you attempting to get the file?
>
> if you're using the NSURLConnection classes (or NSURLDownload) there
> are some alternate cache methods you could try that won't try to bring
> up the net if it's not already up.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Is my computer connected to the web?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: Is my computer connected to the web? (From: Scott Anguish <email@hidden>)

  • Prev by Date: ScreenSaver *really* stopped vs monitor-slept?
  • Next by Date: Re: Is my computer connected to the web?
  • Previous by thread: Re: Is my computer connected to the web?
  • Next by thread: Re: Is my computer connected to the web?
  • Index(es):
    • Date
    • Thread