mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
http api新建的rtp服务器可以自动超时移除
This commit is contained in:
@@ -177,6 +177,16 @@ bool RtpProcess::alive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void RtpProcess::onDetach(){
|
||||
if(_on_detach){
|
||||
_on_detach();
|
||||
}
|
||||
}
|
||||
|
||||
void RtpProcess::setOnDetach(const function<void()> &cb) {
|
||||
_on_detach = cb;
|
||||
}
|
||||
|
||||
string RtpProcess::get_peer_ip() {
|
||||
if(_addr){
|
||||
return SockUtil::inet_ntoa(((struct sockaddr_in *) _addr)->sin_addr);
|
||||
|
||||
Reference in New Issue
Block a user