Doru, On 24 Feb 2012, at 10:14, Tudor Girba wrote:
> Hi, > > I would need to listen to a TCP/IP port and receive plain text. What > is the way to do that in Pharo these days? > > Cheers, > Doru > > -- > www.tudorgirba.com > > "Every thing has its own flow" Have a look at the ZnServer hierarchy, specifically ZnSingleThreadedServer which does not spawn threads for each incoming request (not used as such in Zn, but easier to understand) and ZnMultiThreadedServer which does spawn threads for each incoming request (the current default in Zn). Start with #listenLoop. The code is slightly more complicated that example code because of all the error handling, but I am sure you will be able to read it. HTH, Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill
