|
|
@ -45,10 +45,13 @@ srs_error_t SrsHttpHooks::on_connect(string url, SrsRequest* req)
|
|
|
|
srs_error_t err = srs_success;
|
|
|
|
srs_error_t err = srs_success;
|
|
|
|
|
|
|
|
|
|
|
|
SrsContextId cid = _srs_context->get_id();
|
|
|
|
SrsContextId cid = _srs_context->get_id();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SrsStatistic* stat = SrsStatistic::instance();
|
|
|
|
|
|
|
|
|
|
|
|
SrsJsonObject* obj = SrsJsonAny::object();
|
|
|
|
SrsJsonObject* obj = SrsJsonAny::object();
|
|
|
|
SrsAutoFree(SrsJsonObject, obj);
|
|
|
|
SrsAutoFree(SrsJsonObject, obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
obj->set("server_id", SrsJsonAny::str(stat->server_id().c_str()));
|
|
|
|
obj->set("action", SrsJsonAny::str("on_connect"));
|
|
|
|
obj->set("action", SrsJsonAny::str("on_connect"));
|
|
|
|
obj->set("client_id", SrsJsonAny::str(cid.c_str()));
|
|
|
|
obj->set("client_id", SrsJsonAny::str(cid.c_str()));
|
|
|
|
obj->set("ip", SrsJsonAny::str(req->ip.c_str()));
|
|
|
|
obj->set("ip", SrsJsonAny::str(req->ip.c_str()));
|
|
|
|