ConnectionQueue question???

Rob Withers rwithers at exobox.com
Tue Oct 3 15:53:36 UTC 2000


Johan Fabry wrote:

> jchludzinski at worldkey.net wrote:
>
> > I create an instance of ConnectionQueue to listen on a specified
> > portNumber (hardwiring the queueLength to be 4).  When I try to
> > connect to this instance
> >
> > (using an instance of Socket:
> >
> > socket _ Socket newTCP.
> > socket connectTo: (NetNameResolver localHostAddress) port: 54321.
> > socket waitForConnectionUntil: Socket standardDeadline.)
> >
> > nothing shows up in 'connection' (an instance of
> > OrderedCollection).  As a consequence, 'getConnectionOrNil' returns
> > 'nil'.
> >
> > Obviously I'm doing something wrong, any suggestions???
>
> 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.  Perhaps there is a
good reason why it isn't, but I don't know what it is.  Otherwise, we could
register a start up Class (Socket) and implement #startUp.

Rob

>
> --
> "You are more than the sum       Johan Fabry - Johan.Fabry at vub.ac.be
>  of what you consume.            Vrije Universiteit Brussel
>  Desire is not an occupation."   Programming Technology Lab, Room 10F709
>   -- KMFDM                       Pleinlaan 2, 1050 Brussels, Belgium





More information about the Squeak-dev mailing list