problem with sockets

johnm at wdi.disney.com johnm at wdi.disney.com
Mon Dec 21 19:45:28 UTC 1998


Folks,

I'm the guy responsible for the current Squeak socket API, and I
completely agree: it should definitely be based on the Berkeley listen()
and accept() semantics. There's no other way to handle back-to-back
connection requests.

Historical note: The problem is that MacTCP doesn't support a connection
queuing model like Berkeley sockets. I had hoped to emulate this queuing
mechanism in Smalltalk where it would be easy to debug and change.
And that worked--almost! HTTP clients that produce rapid bursts of
back-to-back requests hit this design in its Achilles heel--the tiny
time window right after a connection is estabilished during which
there is no socket waiting for the next connection.

I'm willing to fix it. What would help me is pointers to open-source
implementations of Berkeley sockets for the Mac using either MacTCP or
OpenTransport. The code needs to work under Mac OS 7.x as well
as 8.x and on both the PPC and 68K. I think Craig Latta mentioned
a Berkeley-socket C library that might work, if the source is available.
Of course, the code must be free of legal entanglements that would
prevent us from distributing its source code with the Squeak release.

If you'd like to help, please send me email with pointers to code
that might be useful. Or, if you are a good Mac hacker and would
like to lend a hand to the effort (mostly ust answering questions),
let me know.

Note that all other platforms have Berkeley socket API's, so once
we have a solution on the Mac, it will be easy to port everywhere.

Thanks!

	-- John

P.S. I won't have time to work on this until mid-January at the
earliest.





More information about the Squeak-dev mailing list