How to create multiple clients and use select?
Hi,
This is a broad extension to my earlier postI have a server code to handle multiple clients.The server is launching a thread after an accept() .I am creating client connections in a for loop.My aim is to test how many client connections a server can handle.I am storing all the socket fds of client in an array.Finally I am launching only one client reader thread to read server messages.I am trying to use a select() here to check if any client socket received message from the server.But I am unable to assign ALL the socket descriptors to fd-set so that I can do a select.Only the first one is getting assigned.I am stuck here.Is there any link/tested code to do similar task.The purpose is to write a client program to simulate multiple clients using 'C' langauge. Sorry for lack of clarity.My expression of technical problem is very poor. Give a generous feedback. Thansk & regards, Ramakrishna |
Do not create multiple threads on the same topic. If you feel like you have posted a thread in the wrong forum you can ask a mod to move it.
continue here: http://www.linuxquestions.org/questi...-fdset-668868/ |
All times are GMT -5. The time now is 11:37 AM. |