you are right, but what I mean is
if the same url and load queue as use download manager
I want to limit the number of active connections to receive specific url, not the total active connection by user
other samples
I want to restrict a user open two tabs open youtube page
if one tab has to load the video and the other tabs video url will disconnect/refuse
my extension
--[[ <HCExtension>
@name limit
@author reges007
@version 1
@description only one accept url at the same time
@rule googlevideo.com/videoplayback
@event BeforeRequestHeaderSend/Request
</HCExtension> ]]
function Request()
local l = hc.get_users_stat('local')
local lnk = re.find(hc.url, [[googlevideo.com/videoplayback]])
if hc.method == 'GET' and lnk and l and l['local'].connections_number > 1 then
hc.monitor_string = 'disconnect'
hc.client_disconnect()
end
end
this will immediately disconnect because user local is already/still active connection one or more
for it I asked is it possible function .connection_number for the url connection active?