summaryrefslogtreecommitdiff
path: root/agent/pseudotcp.h
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-01-07 20:28:50 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-01-31 01:48:57 -0500
commiteb231e64cc3e72d47ff5d0b5761389725778fab3 (patch)
treefa12dcd43cdbda81ed30e83326453b686ccfdc4a /agent/pseudotcp.h
parentfe5dc58b239ac5ab252cd95b9a0650a208e5df9c (diff)
downloadlibnice-eb231e64cc3e72d47ff5d0b5761389725778fab3.tar.gz
pseudotcp: Add methods to query the state of the send and recv buffers
Diffstat (limited to 'agent/pseudotcp.h')
-rw-r--r--agent/pseudotcp.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/agent/pseudotcp.h b/agent/pseudotcp.h
index f8fa198..f5cd1a9 100644
--- a/agent/pseudotcp.h
+++ b/agent/pseudotcp.h
@@ -412,6 +412,34 @@ gboolean pseudo_tcp_socket_notify_packet(PseudoTcpSocket *self,
*/
void pseudo_tcp_set_debug_level (PseudoTcpDebugLevel level);
+
+/**
+ * pseudo_tcp_socket_get_available_bytes:
+ * @self: The #PseudoTcpSocket object.
+ *
+ * Gets the number of bytes of data in the buffer that can be read without
+ * receiving more packets from the network.
+ *
+ * Returns: The number of bytes or -1 if the connection is not established
+ *
+ * Since: 0.1.5
+ */
+
+gint pseudo_tcp_socket_get_available_bytes (PseudoTcpSocket *self);
+
+/**
+ * pseudo_tcp_socket_can_send:
+ * @self: The #PseudoTcpSocket object.
+ *
+ * Returns if there is space in the send buffer to send any data.
+ *
+ * Returns: %TRUE if data can be sent, %FALSE otherwise
+ *
+ * Since: 0.1.5
+ */
+
+gboolean pseudo_tcp_socket_can_send (PseudoTcpSocket *self);
+
G_END_DECLS
#endif /* _PSEUDOTCP_H */