Code

store_lookup: Made the attribute matcher a "standalone" matcher.
[sysdb.git] / src / include / client / sock.h
index c88fc9a02041d2a7d0f06970428e17dfcb064c07..bce3da91898a670a00eb532e630e2b0663462321 100644 (file)
@@ -76,6 +76,13 @@ sdb_client_destroy(sdb_client_t *client);
 int
 sdb_client_connect(sdb_client_t *client, const char *username);
 
+/*
+ * sdb_client_sockfd:
+ * Return the client socket's file descriptor.
+ */
+int
+sdb_client_sockfd(sdb_client_t *client);
+
 /*
  * sdb_client_close:
  * Close the client connection.
@@ -89,7 +96,7 @@ sdb_client_close(sdb_client_t *client);
  * connection.
  *
  * Returns:
- *  - 0 on success
+ *  - the number of bytes send
  *  - a negative value else.
  */
 ssize_t
@@ -114,6 +121,14 @@ ssize_t
 sdb_client_recv(sdb_client_t *client,
                uint32_t *code, sdb_strbuf_t *buf);
 
+/*
+ * sdb_client_eof:
+ * Returns true if end of file on the client connection was reached, that is,
+ * if the remote side closed the connection.
+ */
+_Bool
+sdb_client_eof(sdb_client_t *client);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif