In perl.beginners, you wrote:
>
>What I need to do is to have the application listening for connections
>while still allowing the user to do stuff. I am using IO::Socket and since
>the accept function blocks I think I have to use atleast 2 threads for
>this to happen. I would love it if someone would tell me otherwise
>however.
>
>Is it safe to say that the Thread.pm module will be a safe and portable
>way to do concurrency in future versions of perl? Right now I am using the
>activestate perl which won't let me use threads because of ithreads or
>something. Basically I want this to run well on my windows and my linux
>system so should I change the perl distribution to one that includes the
>Treads module? If so, which one is that?
Hi. I'm not sure if you got an answer yet.
POE's distribution includes a samples directory with several
"concurrent" socket servers. I'm pretty sure it will do what you want
in a portable way. For example, the module was originally written on
OS/2, it runs on Linux, FreeBSD, Solaris and Win32.
It's possible to create new sockets without blocking the rest of the
program. POE's SocketFactory class will do it.
-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]