Refine SrsUdpPacketRecvCycleInterval in time unit.

pull/1651/head
winlin 6 years ago
parent 283c4c7449
commit 6b587c5e0f

@ -43,8 +43,8 @@ using namespace std;
// set the max packet size. // set the max packet size.
#define SRS_UDP_MAX_PACKET_SIZE 65535 #define SRS_UDP_MAX_PACKET_SIZE 65535
// sleep in ms for udp recv packet. // sleep in srs_utime_t for udp recv packet.
#define SrsUdpPacketRecvCycleMS 0 #define SrsUdpPacketRecvCycleInterval 0
// nginx also set to 512 // nginx also set to 512
#define SERVER_LISTEN_BACKLOG 512 #define SERVER_LISTEN_BACKLOG 512
@ -173,8 +173,8 @@ srs_error_t SrsUdpListener::cycle()
return srs_error_wrap(err, "handle packet %d bytes", nread); return srs_error_wrap(err, "handle packet %d bytes", nread);
} }
if (SrsUdpPacketRecvCycleMS > 0) { if (SrsUdpPacketRecvCycleInterval > 0) {
srs_usleep(SrsUdpPacketRecvCycleMS * SRS_UTIME_MILLISECONDS); srs_usleep(SrsUdpPacketRecvCycleInterval);
} }
} }

Loading…
Cancel
Save