how to debug socket use
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Tue Apr 20 08:49:16 UTC 2004
Hi Richard!
Just a few hints "off the top of my head" without having looked at your
code:
1. Make sure the Processes yield to each other. For example I think you
should run them in lower priorities so that they get preempted by
another Process running in a higher prio. I think this was a good thing
to do IIRC.
2. You can play with the SharedStreams package to "emulate" Sockets. In
a previous project we built the SharedBidirectionalStream to work as a
replacement for SocketStream (a multi-demultiplexer so that multiple
connections could be run over a single socket).
Anyway, in that project we successfully had multiple unit tests setting
up servers and running clients from and to the same image - so it can be
done. But as I said - you might need to play with the Process prios.
Oh, yeah and btw, you should use SocketStream - no need to be messing
around at the Socket layer anymore IMHO.
regards, Göran
More information about the Squeak-dev
mailing list
|