[aida] Swazoo Client/Server?

Rob Rothwell r.j.rothwell at gmail.com
Thu Sep 25 00:01:15 CEST 2008


On Tue, Sep 23, 2008 at 1:38 PM, Janko Mivšek <janko.mivsek at eranova.si>wrote:

> It depends a lot of your app. But if there is not a HTTP protocol involved,
> you better go with sockets directly. I propose that you get used of Sport's
> SpSocket, to be safely portable in the future.
>
> I attached such a little server I made recently, named LineTCPConnect and
> this is kind of Swazoo lite. This is a fileout from VW and should be easily
> imported to Squeak. Just Word menu>Open>File list, find .st, right click and
> "remove line feeds" then "code-file browser"...
>

I managed to get this into Squeak, with a little pretty-print help to fix up
the missing linefeeds!

Now I just have to learn how to actually read from the Socket, since the
tests die during

stream  := self socket accept underlyingSocket readStream binary.

in

acceptConnection
 | stream |
stream  := self socket accept underlyingSocket readStream binary.
self receiveContentFrom: stream.
self parseContent.
self postReceiveAction.
stream close.

since squeak has no Socket>>readStream method, which is apparently what the
underlyingSocket is in Squeak!

I see why Michael said "better even SocketStream," though I don't know how
to use that either!

Thanks...I at least know what to try to figure out now...

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aidaweb.si/pipermail/aida/attachments/20080924/aa1371b5/attachment.htm 


More information about the Aida mailing list