android - Does recv() always return a complete data packet which has the expected length? -


i have question regarding recv (c, android).

is recv guaranteed return complete udp datagram when returns?

in case using recv read rtp packets socket. expected length of each rtp packet 172 (160 bytes payload , 12 header). however, i'm not sure whether have guarantee i'll complete 172 bytes when recv returns data.

can confirm/comment?

per posix, recv returns entire udp packet, unless , error occurs or buffer small entire packet. can detect setting msg_trunc flag, causes recv return frame's actual data length, can compare buffer size.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -