Socket

johnm at wdi.disney.com johnm at wdi.disney.com
Mon Nov 9 19:44:39 UTC 1998


"John \(Zhijiang\) Han" <zhan1 at uiuc.edu> wrote:
> I'm wondering how could you make a socket (created by 
> 
> 	socket := createIfFail: []
> 
> and the result was not nil) invalid, besides doing
> 
> 	socket destroy
> 
> (explicitly or implicitly, like snapshot.)

As you say, when you restart a snapshot that was saved with
existing sockets (in any state), then the state of all these sockets
become invalideSocket when you restart the image. (That is
because the underlying OS sockets no longer exist.) Otherwise,
a socket should not become invalid unless you destroy it.


> Is it possible for a socket being both invalid and connected?  I mean are
> those states (shown in Socket class>>#initialize) mutually exclusive? 

Yes.

	-- John





More information about the Squeak-dev mailing list