mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from srs2.
This commit is contained in:
commit
ffef3905af
5 changed files with 26 additions and 3 deletions
|
@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <arpa/inet.h>
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef SRS_OSX
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -47,6 +48,7 @@ using namespace std;
|
|||
#include <srs_protocol_json.hpp>
|
||||
#include <srs_kernel_buffer.hpp>
|
||||
#include <srs_protocol_amf0.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
|
||||
// the longest time to wait for a process to quit.
|
||||
#define SRS_PROCESS_QUIT_TIMEOUT_MS 1000
|
||||
|
@ -1340,6 +1342,11 @@ string srs_get_peer_ip(int fd)
|
|||
return ip;
|
||||
}
|
||||
|
||||
bool srs_string_is_http(string url)
|
||||
{
|
||||
return srs_string_starts_with(url, "http://", "https://");
|
||||
}
|
||||
|
||||
bool srs_is_digit_number(const string& str)
|
||||
{
|
||||
if (str.empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue