It has to be
1. Open a listening socket:
2. When a client connects, I need to pump the content of all the 100 hundred files to the client and disconnect.
NOTE: when reading from files, I will read a packet(collection of events delimited by \r\n) from file 1 and pump into the socket, then read a packet from file 2 pump into the socket, it goes on for all the 100 files as long as there are packets in the file.
It won't be always file1 and file2 , it can be file1, file100, file10, ...(asynchronous).
This pumping should occur in parallel.
Actually I am trying to simulate a C program which solved the above problem using threads effectively.
3. Repeat.
I hope that I have given some clarity of my problem.
Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.