gsocket: add G_IO_ERROR_CONNECTION_CLOSED
authorDan Winship <danw@gnome.org>
Fri, 19 Aug 2011 14:23:12 +0000 (10:23 -0400)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 10 Jul 2015 09:47:42 +0000 (11:47 +0200)
commit53d4947f5978388c05b260df47587b993febb1a7
treed99fc68fc1caba156a7b6722ae05a1ac7103a8d6
parent4b962541d9293b6f63252b8d867f575e100f7993
gsocket: add G_IO_ERROR_CONNECTION_CLOSED

Add G_IO_ERROR_CONNECTION_CLOSED as an alias for
G_IO_ERROR_BROKEN_PIPE, and also return it on ECONNRESET.

It doesn't really make sense to try to distinguish EPIPE and
ECONNRESET at the GLib level, since the exact choice of which error
gets returned in what conditions depends on the OS. Given that, we
ought to map the two errors to the same value, and since we're already
mapping EPIPE to G_IO_ERROR_BROKEN_PIPE, we need to map ECONNRESET to
that too. But the existing name doesn't really make sense for sockets,
so we add a new name.

https://bugzilla.gnome.org/show_bug.cgi?id=728928
gio/gioenums.h
gio/gioerror.c
gio/tests/socket.c