Yep, using fork() will make your code less portable. If you want concurrency and don't
want to use fork(), you'll need to either experiment with threads (as suggested by
Jos), or build a multiplexed server using select(). One book I've found useful is
Network Programming with Perl by Lincoln D Stein (Addison Wesley, $39.95).
>>> Ryan Boder <[EMAIL PROTECTED]> 07/08/01 08:57pm >>>
Hi,
I am very new to perl. In fact, I am trying to write my first perl app
ever. I would like it to do peer to peer networking. I have always been
a C programmer and if I wanted to do this in C I would use threads and
have one accepting connections and one initiating connections. Well, I
read that thread support for perl was experimental and you had to
recompile perl to include a thread.pm module. I really don't want to do
that since not very many people would then want to use my program. Also
I read that using fork was a bad idea when trying to write portable code.
So what would be the best way to be able to both accept and initiate
network connections in perl? I want it to be portable. I assume some
kind of concurrency would be needed but then again I havce only been
using perl for a week.
Thanks,
Ryan
This e-mail and any files transmitted with it are confidential
and solely for the use of the intended recipient.
ONdigital plc, 346 Queenstown Road, London SW8 4DG. Reg No: 3302715.