mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine SrsUdpPacketRecvCycleInterval in time unit.
This commit is contained in:
parent
283c4c7449
commit
6b587c5e0f
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue