ConnectionBudget
The session-wide connection cap, the enforcement half of libtorrent's connections_limit setting (session_impl::m_settings, default 200).
Every torrent shares one budget: an outbound dial or inbound accept first takes a slot (tryAcquire); when none is free the dial is skipped / the accepted socket is closed, which is libtorrent's too_many_connections disconnect. The slot is returned on disconnect (release).
Properties
Functions
Link copied to clipboard
Return a slot taken by tryAcquire.
Link copied to clipboard
Take a connection slot; false (and no slot) when the session is full.