Add GCancellables to GSocket ops
authorDan Winship <danw@gnome.org>
Tue, 23 Jun 2009 21:42:01 +0000 (17:42 -0400)
committerDan Winship <danw@gnome.org>
Tue, 30 Jun 2009 15:42:17 +0000 (11:42 -0400)
commit53beca955e016fb9ef4e80d223d059bc5e51dd41
tree1a7b5f107f53ce2ad3da5b3615917d0f02ec630e
parentfc2b3ee560e29b4ef6e70928b0be75d833d75aec
Add GCancellables to GSocket ops

Currently, to implement cancellability correctly, all synchronous
calls to GSocket must be preceded by a g_socket_condition_wait() call,
(even though GSocket does this internally as well) and all
asynchronous calls must do occasional manual
g_cancellable_is_cancelled() checks. Since it's trivial to do these
checks inside GSocket instead, and we don't particularly want to
encourage people to use the APIs non-cancellably, move the
cancellation support into GSocket and simplify the existing callers.

http://bugzilla.gnome.org/show_bug.cgi?id=586797
gio/gsocket.c
gio/gsocket.h
gio/gsocketclient.c
gio/gsocketinputstream.c
gio/gsocketlistener.c
gio/gsocketoutputstream.c
gio/gtcpconnection.c
gio/gunixconnection.c
gio/tests/socket-client.c
gio/tests/socket-server.c