ConnectionQueue question???

Bijan Parsia bparsia at email.unc.edu
Tue Oct 3 16:23:02 UTC 2000


On Tue, 3 Oct 2000, Rob Withers wrote:
[snip]
> > The code seems OK to me. I suspect you forgot to initialize the network.
> > (NetNameResolver initializeNetworkIfFail: [self error: 'network
> > initialization failed'].)
> >
> 
> Wouldn't it be nice if....this happened on startup.

No.

>  Perhaps there is a
> good reason why it isn't,

Yes.

> but I don't know what it is.

I do! And in the spirit of generosity that characterizes all my list-like
activities (prose *and* cons) (laugh, someone, *please*!), I'll even tell
you. On certain systems, e.g., the macintosh but I'm sure other systems do
similar things, if one is not connected to the net (due, for example, to
having an intermittent PPP connection), in certain configurations
initializing the network primatives will cause the os to try to make a PPP
connection. VisualWorks *does* initialize it's prims at startup, and has,
as noted in an FAQ, this very problem.

>  Otherwise, we could
> register a start up Class (Socket) and implement #startUp.

The, perhaps saner, alternative is to ensure that network initialization
is done appropriately in a key, low level place (Socket>>initialize
and the NetNameResolver class lookup methods). Note that the end user
apps throw in the appropriate call, so this is really only a problem for
app users and workspace code.

A preference to initialize at startup isn't such a good idea, I think,
since that will tend to encourage code that breaks under the above
mentioned circumstances.

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list