gsocket: Add g_socket_receive_messages()

Add support for receiving multiple messages with a single system call,
using recvmmsg() if available. Otherwise, fall back to looping over
g_socket_receive_message().

This adds new API, g_socket_receive_messages(), and corresponding unit
tests.

https://bugzilla.gnome.org/show_bug.cgi?id=751924
This commit is contained in:
Philip Withnall
2015-06-12 08:47:37 +01:00
parent a0cefc2217
commit f62cbfc022
6 changed files with 467 additions and 3 deletions

View File

@@ -2017,6 +2017,7 @@ g_socket_check_connect_result
g_socket_receive
g_socket_receive_from
g_socket_receive_message
g_socket_receive_messages
g_socket_receive_with_blocking
g_socket_send
g_socket_send_to