index 372e34d474b7be20dd5fc13ce6c04025748bc0a8..f3f1a871d83e48c28e96bee92fd8a40ac4e3188a 100644 (file)
extern "C" {
#endif
+enum {
+ SDB_PROTO_SELECTIN = 0,
+ SDB_PROTO_SELECTOUT,
+ SDB_PROTO_SELECTERR,
+};
+
+/*
+ * sdb_proto_select:
+ * Wait for a file-descriptor to become ready for I/O operations of the
+ * specified type. This is a simple wrapper around the select() system call.
+ * The type argument may be any of the SDB_PROTO_SELECT* constants.
+ *
+ * Returns:
+ * - the number of file descriptors ready for I/O
+ * - a negative value on error
+ */
+int
+sdb_proto_select(int fd, int type);
+
ssize_t
sdb_proto_send(int fd, size_t msg_len, const char *msg);