gettingstarted
[Top] [All Lists]

Re: Check if Online

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Check if Online
From: "Jon" <jon at scruffyduck dot co dot uk>
Date: Wed, 30 Jun 2004 07:14:34 +0100
Delivered-to: gettingstarted at lists dot realsoftware dot com
List-help: <mailto:gettingstarted-request@lists.realsoftware.com?subject=help>
List-id: Getting Started <gettingstarted.lists.realsoftware.com>
List-post: <mailto:gettingstarted@lists.realsoftware.com>
Priority: normal
References: <40E1D438 dot 20687 dot D40D619 at localhost>
On 29 Jun 2004 at 13:54, Phil Mobley wrote:

> On Jun 29, 2004, at 12:42 PM, Jon wrote:
> 
> >> Connecting to a well-known website would be a good way to test if 
> >> just your website is down or the entire internet (for the user's 
> >> computer), but it would still dial out if the user was not connected.
> >
> > That is not how I understand it - the socket does not dial up since it 
> > has no means of doing so - if there is no pre-existing dialup 
> > connection then it returns an error.  If I am wrong then I am sure 
> > someone will correct me on this one
> 
> Yes it does, if the User has enabled automatic connection.
> 
> Below is a Carbon build of SourceViewer... a quick 5 minute project 
> which just displays the data of a URL in an edit field.
> 
>      http://www.mobleybros.com/SourceViewer.sitx
> 
> And the source for the project:
> 
>      http://www.mobleybros.com/HTTPSocketExample.rb.zip
> 
> This project does not do any checking to see if the user is connected 
> to the internet... it just goes ahead and requests the information.
> 
> To force it to dial out...
> 
> 1.  Disconnect the ethernet cable or airport (if present).
> 2.  Enable the Modem.
> 3.  Under "PPP Options..." enable the "Connect automatically when 
> needed" option (OS X) or "Auto connect when launching TCP applications" 
> (OS 9).
> 4.  Start up the SourceViewer application and click the "Get Source" 
> button.
> 
> You will see that the modem is dialing out.  In this SourceViewer 
> example, automatic dialing is what is the expected behavior.  But to 
> passively check for a new version when the application starts up, I 
> don't want the modem to dial out.  I only want to check the version if 
> the user is already connected to the internet.
> 
> Another purpose of a passive internet check could be to compare serial 
> numbers with a registration database... or to see if there are multiple 
> copies running on the internet with the same serial number.
> 
> My workaround for right now is to only provide this functionality in a 
> menu item... then if the user selects this option they have elected to 
> dial out.
> 
Hi Phil

Thanks for putting me right on that one.  I only write for windows, 
but I'm sure the same option exists there too.  In my application 
this would actually be an advantage since the program uses an SMTP 
socket. - I wonder if the SMTP socket behaves the same way?  Altho 
that would not be much help as each user could have a different smtp 
server



_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>