mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refactor bandwidth test, refactor the interface of bandwidth server object.
This commit is contained in:
parent
7f21520e9f
commit
b1dd0218be
4 changed files with 45 additions and 37 deletions
|
@ -29,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
*/
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <srs_app_st.hpp>
|
||||
|
||||
class SrsRequest;
|
||||
|
@ -73,16 +75,19 @@ class SrsRtmpServer;
|
|||
class SrsBandwidth
|
||||
{
|
||||
private:
|
||||
SrsRequest* req;
|
||||
SrsRtmpServer* rtmp;
|
||||
SrsRequest* _req;
|
||||
SrsRtmpServer* _rtmp;
|
||||
public:
|
||||
SrsBandwidth();
|
||||
virtual ~SrsBandwidth();
|
||||
public:
|
||||
/**
|
||||
* do the bandwidth test.
|
||||
* do the bandwidth check.
|
||||
* @param rtmp, server RTMP protocol object, send/recv RTMP packet to/from client.
|
||||
* @param req, client request object, specifies the request info from client.
|
||||
* @param local_ip, the ip of server which client connected at
|
||||
*/
|
||||
virtual int bandwidth_test(SrsRequest* _req, st_netfd_t stfd, SrsRtmpServer* _rtmp);
|
||||
virtual int bandwidth_check(SrsRtmpServer* rtmp, SrsRequest* req, std::string local_ip);
|
||||
private:
|
||||
/**
|
||||
* used to process band width check from client.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue