GNOME Bugzilla – Bug 668009
GSocket: Add function to query the currently queued amount of data on the socket
Last modified: 2012-01-16 17:42:58 UTC
Hi, this is useful to know in advance how large the next pending datagram on an UDP socket is at least. Without this it's impossible to guarantee that a complete datagram is read. Patch (not by me) is at http://gitorious.org/frida/glib/commit/baf675d/diffs This works as expected on Windows and Linux at least (and works with non-UDP sockets too).
One of the commits here has the patch from gitorious, applying cleanly against latest master http://cgit.collabora.com/git/user/slomo/glib.git/log/?h=socket-multicast
commit fbdb8128dce3ef013640c7142888a76f56a7f0f8 Author: Ole André Vadla Ravnås <oravnas@cisco.com> Date: Mon Jan 16 14:00:49 2012 +0100 GSocket: Add function to get the currently available bytes for reading https://bugzilla.gnome.org/show_bug.cgi?id=668009