Subject: Re: [Boost-users] [boost-user][asio]How can i limit tcpserver's connection count?
From: Arnaud Degroote (arnaud.degroote_at_[hidden])
Date: 2011-03-16 06:02:57


On 15/Mar - 20:07, rhapsodyn wrote:
> Yes, i considered the "don't call start_accept() if (limit > threshold)"
> idea.(in fact, only with accept.close(), i can avoid the unexpected extra
> client)
> But when some "active" connection becoming "inactive", how can i restart the
> accept action? with another thread? It seems weird, because i thought there
> has to be a accept thread "always running" on server :0

I don't know the design of our whole server but you must deal with
client disconnection (and decrease limit in this case ). If limit get
under the threshold, just accept new connection.

-- 
Arnaud Degroote
PhD Student 
RIA LAAS / CNRS