After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668009 - GSocket: Add function to query the currently queued amount of data on the socket
GSocket: Add function to query the currently queued amount of data on the socket
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-01-16 12:54 UTC by Sebastian Dröge (slomo)
Modified: 2012-01-16 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2012-01-16 12:54:11 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).
Comment 1 Sebastian Dröge (slomo) 2012-01-16 13:04:15 UTC
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
Comment 2 Sebastian Dröge (slomo) 2012-01-16 17:42:58 UTC
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