Re: need to know about a concurrent server



On Jul 5, 10:59 am, Sheth Raxit <raxitsheth2...@xxxxxxxxx> wrote:
On Jul 5, 9:02 am, kris <raghavakrishn...@xxxxxxxxx> wrote:> In case of concurrent servers the main server waits for a client
request and after the request comes it creates a new process to handle
the client reqeust. so that in essence each client has its own server.

that is one of the design you choose, typically using fork call (in
context of Unix/C programming)

My doubt is whether the newly created process will be able to accept
any connect request
coming from the client i.e can we have multiple accept requests on a
socket at the same time
posted by two different processes.

I would suggest better to check if your OS support threads, also there
are many design alternatives for concurrent server, (i found "Richard
Steven's UNPv1 Chapter : Client Server Design Alternatives"
v.interesting.)

-Raxit

Hi,

while the parent process is running if we pass the information
regarding the filedescriptor obtained during the socket call to a new
filedescriptor using dup2.

now when the child process comes in to execution we pass the new fd to
this is process and post an accept request.
does this mean that we are posting an accept request on the same
socket we have obtained during the first socket call.

--Krish

.



Relevant Pages

  • Re: Socket switch delay
    ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
    (microsoft.public.win32.programmer.networks)
  • Re: suid bit files + securing FreeBSD (new program: LockDown)
    ... I found the design maybe LockDown or your IDS could use ... So you need at least one CFC server, ... the client boots, it will just use the files it already have and update ... The multicast address the client is a member of. ...
    (FreeBSD-Security)
  • Re: Locking on async calls
    ... you must synchronize the entire SendMessage routine as an atomic ... operation to prevent mixed messages from being transmitted to the server. ... You are correct that read and write on the socket do not interfere with each ... If you want to handle multiple client connections from one server object ...
    (microsoft.public.dotnet.general)
  • Re: socket communication: socket doesnt connect
    ... Microsoft MVP, MCSD ... As far as your server code goes, ... accept the listening socket. ... Client client = new Client; ...
    (microsoft.public.vc.language)
  • Re: TCP server stop receiving new connections
    ... reset the event mask of your listening socket each time you ... I have a strange problem in my class library used by all our client ... server applications. ... incomming connections, but keeps current connections. ...
    (microsoft.public.win32.programmer.networks)