Add pollable input/output streams
authorDan Winship <danw@gnome.org>
Sat, 18 Sep 2010 17:05:25 +0000 (13:05 -0400)
committerDan Winship <danw@gnome.org>
Fri, 26 Nov 2010 20:08:08 +0000 (15:08 -0500)
commitc20c2c0abd3bdb1b30b85a586ee6095ed75a7bc2
tree77b0d54c202be5c4a068d374323f98750c9dca9a
parent6181c7de36771d4d3bb55785912a934e078b16df
Add pollable input/output streams

When interfacing with APIs that expect unix-style async I/O, it is
useful to be able to tell in advance whether a read/write is going to
block. This adds new interfaces GPollableInputStream and
GPollableOutputStream that can be implemented by a GInputStream or
GOutputStream to add _is_readable/_is_writable, _create_source, and
_read_nonblocking/_write_nonblocking methods.

Also, implement for GUnixInput/OutputStream and
GSocketInput/OutputStream

https://bugzilla.gnome.org/show_bug.cgi?id=634241
19 files changed:
docs/reference/gio/gio-docs.xml
docs/reference/gio/gio-sections.txt
docs/reference/gio/gio.types
gio/Makefile.am
gio/gio.h
gio/gio.symbols
gio/giotypes.h
gio/gpollableinputstream.c [new file with mode: 0644]
gio/gpollableinputstream.h [new file with mode: 0644]
gio/gpollableoutputstream.c [new file with mode: 0644]
gio/gpollableoutputstream.h [new file with mode: 0644]
gio/gsocketconnection.c
gio/gsocketinputstream.c
gio/gsocketoutputstream.c
gio/gunixinputstream.c
gio/gunixoutputstream.c
gio/tests/.gitignore
gio/tests/Makefile.am
gio/tests/pollable.c [new file with mode: 0644]