Re: [Socket Programming]: Need info for Client / Server scenario
From: Andrew Gaffney (agaffney_at_skylineaero.com)
Date: 05/31/04
- Next message: Suresh Pasupula: "[Socket Programming]: Need info for Client / Server scenario"
- Previous message: Adam: "Re: Any wrong?"
- In reply to: Suresh Pasupula: "[Socket Programming]: Need info for Client / Server scenario"
- Next in thread: Lrmk: "Re: [Socket Programming]: Need info for Client / Server scenario"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 May 2004 23:20:17 -0500 To: suresh.pasupula@wipro.com
suresh.pasupula@wipro.com wrote:
> 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
- Next message: Suresh Pasupula: "[Socket Programming]: Need info for Client / Server scenario"
- Previous message: Adam: "Re: Any wrong?"
- In reply to: Suresh Pasupula: "[Socket Programming]: Need info for Client / Server scenario"
- Next in thread: Lrmk: "Re: [Socket Programming]: Need info for Client / Server scenario"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|