As far as I understand your question you want to write a client server application where the client is actually the telnet program (very thin client) so the server is a console TCP daemon. Since the server is supposed to serve more then one client you need to have a mechanism for parallel request processing. Or perhaps you don't? Are you sure you need that? Can't the requests just wait in a queue?
If you really need to process the requests in parallel you can achieve this in a few ways:
- by inetd (forked new daemon process for each connection)
- by implementing the parallelism in your program:
- by forking in your program
- by using threads
- other mechanisms like cooperative parallelism in POE
I hope this will help you to choose the architecture.