1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine get_bw_check_interval in time unit

This commit is contained in:
winlin 2019-04-08 08:46:22 +08:00
parent 74c1944e15
commit bb6389143f
4 changed files with 21 additions and 12 deletions

View file

@ -34,6 +34,7 @@
#include <srs_app_reload.hpp>
#include <srs_app_async_call.hpp>
#include <srs_app_thread.hpp>
#include <srs_service_st.hpp>
class SrsRequest;
class SrsFileWriter;
@ -896,12 +897,12 @@ public:
*/
virtual std::string get_bw_check_key(std::string vhost);
/**
* the check interval, in ms.
* the check interval, in srs_utime_t.
* if the client request check in very short time(in the interval),
* SRS will reject client.
* @remark this is used to prevent the bandwidth check attack.
*/
virtual int get_bw_check_interval_ms(std::string vhost);
virtual srs_utime_t get_bw_check_interval(std::string vhost);
/**
* the max kbps that user can test,
* if exceed the kbps, server will slowdown the send-recv.