Hi, I advanced a bit, but I am still in trouble. I just want to get a communication going with a simple telnet app. Here is what I did: In Pharo: ZnMultiThreadedServer startDefaultOn: 1701. ZnMultiThreadedServer default delegate: PXSLogDelegate new. ZnMultiThreadedServer default log addListener: ZnTranscriptLogger new.. In the Windows 7 command line: - telnet localhost 1701 - then press ENTER And in the Transcript I get: 2012-02-24 13:16:57 201678 D Executing request/response loop 2012-02-24 13:17:02 201678 D ZnUnknownHttpMethod while reading request 2012-02-24 13:17:02 201678 D Closing stream The problem is that I do not want to get as high as http. Is there a way to get this working, or is Zinc too high level for this task? I forgot to mention that I am a total newbie in this area :) Cheers, Doru On Fri, Feb 24, 2012 at 10:56 AM, Tudor Girba <tudor@tudorgirba.com> wrote:
Thanks, Sven. Will do.
Cheers, Doru
On Fri, Feb 24, 2012 at 10:37 AM, Sven Van Caekenberghe <sven@beta9.be> wrote:
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
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"