Making a server.

François THIMON thimof at iutc3.unicaen.fr
Wed Apr 27 12:53:50 UTC 2005


Hi.
To implement a server with the Socket class, I first use the litenOn: method.
Its comment says I need to use waitForConnectionUntil:. Since this method
doesn't seem to exist anywhere I supposed I could use any other function with a
similar name. But all of them work with timeouts. Does someone know whether I
can specify infinite timeout or if have to do something else. I mean : how
could I make a server that just keeps waiting for any connection without
stopping, as any server anywhere?
I naturally thought about writing something like : waitForConnectionFor:1000000
ifTimedOut:[^ self waitForConnectionFor:1000000000 ifTimedOut:self
makeMeWaitAgain].

But I'd just want an infinite wait not an infinite recursivity!!

Can you help me please?




More information about the Squeak-dev mailing list