How to do networking in Squeak?

goran.krampe at bluefish.se goran.krampe at bluefish.se
Mon Feb 2 08:36:15 UTC 2004


Hi all!

"Kwiyi Woo" <kwiyi at hotmail.com> wrote:
> Hello
> I am trying to figure out how to do networking stuff in Squeak. I wrote a 
> very simple code to create a listener at the specified port. But I don't 
> know how to write back value so that the browser can display it. Could 
> anyone please show me a very simple example so that I can leary from it.
> Thanks
> Kwiyi

Best would be if you looked at Comanche:
http://map1.squeakfoundation.org/sm/packagebyname/komhttpserver

...at least if you are interested in doing web stuff.

In general - ConnectionQueue is the heart of a socket server in Squeak,
look at it. And SocketStream is the easiest class to use for client side
stuff. It is higher level than Socket.

regards, Göran

PS. There are tons of packages on SqueakMap that does different kinds on
networking. Install a few and look at how they do it. Also - if you plan
on doing advanced server side networking the package SharedStreams may
be of interest (multiple processes working on streams).



More information about the Squeak-dev mailing list