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

refine the order.

This commit is contained in:
winlin 2015-09-17 13:36:02 +08:00
parent 7b2b11e932
commit 1fd83d9314
30 changed files with 985 additions and 751 deletions

24
trunk/src/app/srs_app_rtmp_conn.cpp Executable file → Normal file
View file

@ -53,6 +53,8 @@ using namespace std;
#include <srs_kernel_utility.hpp>
#include <srs_app_security.hpp>
#include <srs_app_statistic.hpp>
#include <srs_rtmp_utility.hpp>
#include <srs_protocol_json.hpp>
// when stream is busy, for example, streaming is already
// publishing, when a new client to request to publish,
@ -89,13 +91,13 @@ SrsRtmpConn::SrsRtmpConn(SrsServer* svr, st_netfd_t c)
kbps = new SrsKbps();
kbps->set_io(skt, skt);
wakable = NULL;
mw_sleep = SRS_PERF_MW_SLEEP;
mw_enabled = false;
realtime = SRS_PERF_MIN_LATENCY_ENABLED;
send_min_interval = 0;
tcp_nodelay = false;
_srs_config->subscribe(this);
}
@ -208,8 +210,11 @@ int SrsRtmpConn::do_cycle()
}
ret = service_cycle();
http_hooks_on_close();
int disc_ret = ERROR_SUCCESS;
if ((disc_ret = on_disconnect()) != ERROR_SUCCESS) {
srs_warn("connection on disconnect peer failed, but ignore this error. disc_ret=%d, ret=%d", disc_ret, ret);
}
return ret;
}
@ -1308,6 +1313,17 @@ int SrsRtmpConn::do_token_traverse_auth(SrsRtmpClient* client)
return ret;
}
int SrsRtmpConn::on_disconnect()
{
int ret = ERROR_SUCCESS;
http_hooks_on_close();
// TODO: implements it.
return ret;
}
int SrsRtmpConn::http_hooks_on_connect()
{
int ret = ERROR_SUCCESS;