mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine the local ip and interface retrieve
This commit is contained in:
parent
26bcc09017
commit
215b1c234b
7 changed files with 85 additions and 81 deletions
|
@ -81,13 +81,13 @@ SrsSimpleRtmpClient::~SrsSimpleRtmpClient()
|
|||
|
||||
srs_error_t SrsSimpleRtmpClient::connect_app()
|
||||
{
|
||||
std::vector<std::string> ips = srs_get_local_ips();
|
||||
std::vector<SrsIPAddress*>& ips = srs_get_local_ips();
|
||||
assert(_srs_config->get_stats_network() < (int)ips.size());
|
||||
std::string local_ip = ips[_srs_config->get_stats_network()];
|
||||
SrsIPAddress* local_ip = ips[_srs_config->get_stats_network()];
|
||||
|
||||
bool debug_srs_upnode = _srs_config->get_debug_srs_upnode(req->vhost);
|
||||
|
||||
return do_connect_app(local_ip, debug_srs_upnode);
|
||||
return do_connect_app(local_ip->ip, debug_srs_upnode);
|
||||
}
|
||||
|
||||
SrsClientInfo::SrsClientInfo()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue