Suppose I have one server and one client program. Clients have four options (square root, prime number….etc) and can choose any of them. One Server program provides these four services. I want such a system that:
- Client’s request will accept main server(suppose server.c)
- main server will call another server for each service.(suppose for prime number server.c will call prime.c server)
So I need one main server and four child server for four services.
The front-end server will need to parse enough of an incoming request packet to determine the type of request, then build a new packet passing the parameter(s) through to the appropriate server for that type of request. When it receives an answer back, it’ll pass it along to the client (possibly after doing some reformatting and such, if the server it invoked doesn’t provide the result in the form required).