Reputation: 11
in socket between server and many clients we need select().i want to know where shoude be the select() function?server or client? if it should be in server so what changes we should make in client
Upvotes: 1
Views: 564
Reputation: 186068
The use of select()
doesn't affect the semantics of socket communication at all. It just provides a way to wait on multiple sockets (or files) simultaneously, and to subsequently find out which ones are ready to operate on. Since it's the server that typically has many connections, it's the server that calls select()
. Nothing special has to be done on the client.
Upvotes: 3