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 665805 - Add GSocketClient::action, for tracking socket client status
Add GSocketClient::action, for tracking socket client status
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-12-08 16:43 UTC by Dan Winship
Modified: 2011-12-23 19:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add g_socket_connection_connect(), etc (13.99 KB, patch)
2011-12-08 16:43 UTC, Dan Winship
committed Details | Review
Add GSocketClient::action, for tracking socket client status (19.45 KB, patch)
2011-12-08 16:44 UTC, Dan Winship
none Details | Review

Description Dan Winship 2011-12-08 16:43:55 UTC
Posting this here to give people a chance to comment. There's a
libsoup patch that goes along with this to make the signals visible
there, but anyway, this allows for a bunch of things:

  1. network-related debugging (eg, the epiphany soup-fly extension)

  2. progress UIs ("Looking up example.com..." "Connecting to
     example.com...")

  3. timing network operations (eg, for the W3C Navigation Timing
     spec)

  4. fiddling with the connections behind GSocketClient's back
     (eg, adjusting GTlsConnection flags, or calling setsockopt()
     on the local socket before calling connect() on it, which
     dcbw needs in NM to ensure that a particular request gets
     sent from a particular network interface).
Comment 1 Dan Winship 2011-12-08 16:43:57 UTC
Created attachment 203085 [details] [review]
Add g_socket_connection_connect(), etc

Previously it was more or less assumed that GSocketConnections were
always connected, although this was not enforced. Make it explicit
that they don't need to be, and add methods to connect them, and
simplify GSocketClient by using those methods.
Comment 2 Dan Winship 2011-12-08 16:44:01 UTC
Created attachment 203086 [details] [review]
Add GSocketClient::action, for tracking socket client status

This can be used for debugging, or for progress UIs ("Connecting to
example.com..."), or to tweak GTlsClientConnections before
handshaking starts.
Comment 3 Matthias Clasen 2011-12-09 12:56:14 UTC
Is 'action' the right name here ? The enum values sound more like 'state' to me...
Comment 4 Dan Winship 2011-12-09 13:20:45 UTC
Well, I thought of them as "what action the GSocketClient is performing now". But I guess "action" might imply "GAction" now, so yeah, maybe "state" would be better.

(Or "event"?)
Comment 5 Matthias Clasen 2011-12-09 16:10:03 UTC
or 'phase'...naming is hard. Got your Xmas shopping done ?
Comment 6 Dan Winship 2011-12-22 20:45:27 UTC
Comment on attachment 203085 [details] [review]
Add g_socket_connection_connect(), etc

pushed with "action" changed to "event" everywhere

Attachment 203085 [details] pushed as 57f2799 - Add g_socket_connection_connect(), etc
Comment 7 Matthias Clasen 2011-12-23 19:17:59 UTC
Should this be closed, then ?
Comment 8 Dan Winship 2011-12-23 19:59:43 UTC
oops, yes