Does inetd simplify server programs, without affecting the part of concurrently handling multiple clients?
-1
votes
1
answer
50
views
In The Linux Programming Interface, Chapter 60 talks about
- designing a server to concurrently handle multiple clients, by using sockets, multiple processes/threads or thread/process pools
- designing a server to be invoked by inetd which simplifies the sever program.
If a server is to be used with inetd, it only has to deal with inputs from stdin and outputs to stdout, instead of sockets. inetd handles the part of using sockets, multiplex monitors for incoming requests, and for each incoming request, forks a process to execute a server program.
I was wondering if a server program to be used with inetd can still have the same part of concurrently handling multiple clients, as a standalone version of the server program?
Is it correct that inetd forks a new process for each incoming request, to execute the entire server program?
So does the server program not need to handle multiple requests concurrently, but only one request?
Does inetd makes the server program equivalent to a concurrent standalone version which forks a child process to process each received request?
Is that a good choice compared to a standalone multithreaded server program?
Thanks.
Asked by Tim
(106420 rep)
Nov 24, 2020, 11:44 PM
Last activity: Nov 25, 2020, 12:03 AM
Last activity: Nov 25, 2020, 12:03 AM