mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Always do async vs sync correctly in GSocketConnection streams
Previously if a GSocketConnection had a blocking GSocket, it would sometimes block during asynchonous I/O, and if it had a non-blocking socket, it would sometimes return G_IO_ERROR_WOULD_BLOCK from synchronous I/O. This fixes the connection to not depend on the socket state. https://bugzilla.gnome.org/show_bug.cgi?id=616458
This commit is contained in:
@@ -176,6 +176,19 @@ gboolean g_socket_speaks_ipv4 (GSocket
|
||||
GCredentials *g_socket_get_credentials (GSocket *socket,
|
||||
GError **error);
|
||||
|
||||
gssize g_socket_receive_with_blocking (GSocket *socket,
|
||||
gchar *buffer,
|
||||
gsize size,
|
||||
gboolean blocking,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gssize g_socket_send_with_blocking (GSocket *socket,
|
||||
const gchar *buffer,
|
||||
gsize size,
|
||||
gboolean blocking,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SOCKET_H__ */
|
||||
|
Reference in New Issue
Block a user