1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refactor code

This commit is contained in:
winlin 2020-04-16 18:25:11 +08:00
parent 634225f92f
commit 810b32138e

View file

@ -1967,7 +1967,8 @@ srs_error_t SrsUdpMuxSender::cycle()
int real_iovs = p->msg_len; int real_iovs = p->msg_len;
p->msg_len = 0; p->msg_len = 0;
gso_pos++; nn_gso_msgs++; nn_gso_iovs += real_iovs; gso_iovs += real_iovs; gso_pos++; nn_gso_msgs++; nn_gso_iovs += real_iovs;
gso_iovs += real_iovs;
} }
} }
@ -2015,9 +2016,10 @@ srs_error_t SrsUdpMuxSender::cycle()
} }
int nn_cache = 0; int nn_cache = 0;
for (vector<mmsghdr>::iterator it = hotspot.begin(); it < hotspot.end(); ++it) { int nn_hotspot_size = (int)hotspot.size();
mmsghdr& hdr = *it; for (int i = 0; i < nn_hotspot_size; i++) {
nn_cache += hdr.msg_hdr.msg_iovlen; mmsghdr* hdr = &hotspot[i];
nn_cache += hdr->msg_hdr.msg_iovlen;
} }
srs_trace("-> RTC SEND #%d, sessions %d, udp %d/%d/%" PRId64 ", gso %d/%d/%" PRId64 ", iovs %d/%d/%" PRId64 ", pps %d/%d%s, cache %d/%d", srs_trace("-> RTC SEND #%d, sessions %d, udp %d/%d/%" PRId64 ", gso %d/%d/%" PRId64 ", iovs %d/%d/%" PRId64 ", pps %d/%d%s, cache %d/%d",