mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #307, config sendmmsg max
This commit is contained in:
parent
40c95b04ca
commit
7cfd2879b0
8 changed files with 165 additions and 15 deletions
|
@ -428,6 +428,14 @@ int srs_sendmmsg(srs_netfd_t stfd, struct mmsghdr *msgvec, unsigned int vlen, in
|
|||
// further sendmmsg() call to send the remaining messages.
|
||||
return vlen;
|
||||
#else
|
||||
if (vlen == 1) {
|
||||
int r0 = srs_sendmsg(stfd, &msgvec->msg_hdr, flags, timeout);
|
||||
if (r0 < 0) {
|
||||
return r0;
|
||||
}
|
||||
msgvec->msg_len = r0;
|
||||
return 1;
|
||||
}
|
||||
return st_sendmmsg((st_netfd_t)stfd, msgvec, vlen, flags, (st_utime_t)timeout);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue