vni
July 25th, 2007, 08:06 AM
Hi all,
The purpose of listen() is to queue up the waiting clients to request to server and to restrict the number of clients,with which server can respond.
But listen is unable to restrict.it is accepting connections to more num of clients than specified.
Can anyone help me in knowingthe exact purpose and working of listen()?
And how to erstrict the number of clientsusing listen().
for ex:
llisten(sock,5);
Then server should be able to handle only 5 clients,if 6th client requests for connection,it shud be blocked.
Please help me.
The purpose of listen() is to queue up the waiting clients to request to server and to restrict the number of clients,with which server can respond.
But listen is unable to restrict.it is accepting connections to more num of clients than specified.
Can anyone help me in knowingthe exact purpose and working of listen()?
And how to erstrict the number of clientsusing listen().
for ex:
llisten(sock,5);
Then server should be able to handle only 5 clients,if 6th client requests for connection,it shud be blocked.
Please help me.