Socket vs. OldSocket

goran at krampe.se goran at krampe.se
Wed Dec 21 09:24:53 UTC 2005


Hi!

Houssam FAKIH <h_fakih at yahoo.com> wrote:
> Hi,
>   
>   What is the difference between Socket and OldSocket classes in 
> Squeak?  What class I should use to for Stream communication? I have found no  
> test classes on the basic operations on sockets as open a socket, open  
> an input output streams on socket, accept a connection, close the  
> socket, etc... is it normal?

My advice is to not use Socket directly - you most likely want to use
SocketStream instead. In 3.9 the SocketStream implementation is new -
and for older Squeaks you can load the new implementation as the package
called FastSocketStream available on SqueakMap.

The only reason AFAIK for OldSocket still hanging around is the fact
that HttpSocket still uses it, but hopefully we will get it moved over
to Socket soon and then it will be removed.

regards, Göran



More information about the Squeak-dev mailing list