mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine modules, extract core module
This commit is contained in:
parent
c2ccb83912
commit
62fbe9e760
4 changed files with 16 additions and 10 deletions
|
@ -23,12 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <srs_core_log.hpp>
|
||||
|
||||
static int64_t _srs_system_time_us_cache = 0;
|
||||
|
||||
int64_t srs_get_system_time_ms()
|
||||
|
@ -73,7 +72,6 @@ std::string srs_dns_resolve(std::string host)
|
|||
|
||||
hostent* answer = gethostbyname(host.c_str());
|
||||
if (answer == NULL) {
|
||||
srs_error("dns resolve host %s error.", host.c_str());
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -81,7 +79,6 @@ std::string srs_dns_resolve(std::string host)
|
|||
memset(ipv4, 0, sizeof(ipv4));
|
||||
for (int i = 0; i < answer->h_length; i++) {
|
||||
inet_ntop(AF_INET, answer->h_addr_list[i], ipv4, sizeof(ipv4));
|
||||
srs_info("dns resolve host %s to %s.", host.c_str(), ipv4);
|
||||
break;
|
||||
}
|
||||
|
|
@ -4,9 +4,10 @@ file
|
|||
..\main\srs_main_bandcheck.cpp,
|
||||
auto readonly separator,
|
||||
..\..\objs\srs_auto_headers.hpp,
|
||||
core readonly separator,
|
||||
..\core\srs_core.hpp,
|
||||
..\core\srs_core.cpp,
|
||||
app readonly separator,
|
||||
..\app\srs_core.hpp,
|
||||
..\app\srs_core.cpp,
|
||||
..\app\srs_core_amf0.hpp,
|
||||
..\app\srs_core_amf0.cpp,
|
||||
..\app\srs_core_autofree.hpp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue