I am learning the Socket API in Perl now. I am new to this, so I'm sorry if the question is stupid, but I have already searched the net with no results.
I need to create one server and several clients. I have already created a client and a server and they are successfully communicating with each other, but now I need to have one server and many clients. The clients are sending some information to the server, which should handle it. Let me explain using simple example.
The server is the handler for client requests, and it can display on a terminal screen the statistics of network usage or other information coming from the clients. I need to display all clients' information at once, so the server should have the ability to switch between them.
Let's assume that there are four clients connecting to the server. At present the server displays only the second client's information. If I click some button it will switch to another available client in queue or just randomly, and now the information from the third client is displayed, and so on. I need to work with only one client at a time. Also I don't need to store information from clients if it isn't in focus right now.
I have tried to create something like that, but I feel that I have a lack of knowledge now and need some more practice.
Please provide any relevant examples which can help to implement this task. Or just some good direction to follow (books perhaps, or tutorials.)