I need some good links for understanding socket programming (Client / Server programming).
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.
Requirement is:
"Normal clients" keep polling the server for some info.
Server will get some info from a "master client" till then the server responds back with null info to the "Normal clients".
The server data that my master client is updating should get reflected in all the child processes (of forked server) - this is not happening. What should I do to achieve this?
Also I want my server to respond back immediately to all the clients getting connected. This is not happening.
Warning: the following is coming from someone who has never written any programs with multi-connection servers, forking, or threads, but I have done lots of reading ;)
It seems to me that it would work better in your situation to start separate threads instead of forking in your program. It would allow you to easily have a shared memory space, and I believe threads aren't quite as "expensive" as new processes (forking).
Again, keep in mind that you should take anything I say with a grain of salt. Anything I say in this thread should be assumed wrong until verified by someone who has some idea what they are talking about :)
-- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>