Squeak listening to specific IP Addresses?

Andreas Raab andreas.raab at gmx.de
Tue Jan 20 21:02:32 UTC 2004


Hi Ian,

> > In general I think it's
> > advantageous to model the Squeak primitives to closely resemble the BSD
> > sockets interface just on the general grounds of simplifying the VM
> > implementation.
>
> No disagreement there, assuming John wouldn't have to rewrite a bunch
> of really stale and ugly Mac prims to cope...

For bind(), connect() and listen() I wouldn't expect this to be a problem.
All a bind primitive implementation would do is to remember the address+port
for the socket. Then, upon connect or listen primitive it may decide to use
only an address that's equivalent with localHostAddress and otherwise fail.
This behavior would be precisely equivalent with that of a machine with a
single interface and not require much extra effort.

Given the other discussion with David, how about starting to work on a
SocketPlugin v2 which contains these as well as some of the stuff David was
proposing? E.g., this could then also support IPv6, interface enumeration
etc. etc. etc.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list