On May 30, 2004, at 11:06 PM, <[EMAIL PROTECTED]> wrote:
Hi,
Howdy.
I need some good links for understanding socket programming (Client / Server programming).
Not a link specifically, but I feel I would be letting you down if I didn't mention Network Programming with Perl. That is an excellent book that covers exactly what you're after and much more. I strongly recommend it.
I have written some scripts for multiple clients and a server (Forking Server).
But I am facing some problems - the server data has to be shared among all the child processes - does this happen when we fork - what should I do for this to happen.
There are basically three major approaches to these kinds of servers: Forking, Threaded, and Non-Blocking IO. As others have mentioned, Forking is probably not the way to go in this instance. You want one of the other two.
A Threaded server is the easier of the two to write. Unfortunately, it's still plenty involved so I do suggest referencing to book I mentioned above.
Another option you might want to look into is POE, which will probably greatly simplify this kind of thing. It have a learning curve you would need to pass too, but can be useful in many applications. Unfortunately, this option isn't covered by the Networking book, so you'll have to use the POE documentation, if you go this way.
Good luck.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>