summaryrefslogtreecommitdiff
path: root/agent/pseudotcp.h
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-08-08 10:16:00 +0100
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-08-21 14:33:10 -0400
commitc70bc9fc2f15e64d1850148c7cbd9058a5353819 (patch)
treec33d06bb656a7d67cba7aa5a62779bc4f6abd8e9 /agent/pseudotcp.h
parentb6550e044bde83316be6838451aed2c14867133e (diff)
downloadlibnice-c70bc9fc2f15e64d1850148c7cbd9058a5353819.tar.gz
pseudotcp: Add pseudo_tcp_socket_is_closed()
New convenience API to check if the socket is in state TCP_CLOSED.
Diffstat (limited to 'agent/pseudotcp.h')
-rw-r--r--agent/pseudotcp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/agent/pseudotcp.h b/agent/pseudotcp.h
index ca7cb95..65feec4 100644
--- a/agent/pseudotcp.h
+++ b/agent/pseudotcp.h
@@ -471,6 +471,18 @@ gboolean pseudo_tcp_socket_can_send (PseudoTcpSocket *self);
*/
gsize pseudo_tcp_socket_get_available_send_space (PseudoTcpSocket *self);
+/**
+ * pseudo_tcp_socket_is_closed:
+ * @self: The #PseudoTcpSocket object.
+ *
+ * Gets whether the socket is closed, with the shutdown handshake completed,
+ * and both peers no longer able to read or write data to the connection.
+ *
+ * Returns: %TRUE if the socket is closed in both directions, %FALSE otherwise
+ * Since: UNRELEASED
+ */
+gboolean pseudo_tcp_socket_is_closed (PseudoTcpSocket *self);
+
G_END_DECLS
#endif /* _PSEUDOTCP_H */