* to have two connections for the same fd, and use one for read
* operations and one for write.
*
- * You must io_close() both of them to close the fd.
+ * Returning io_close() on one will close both fds!
*
* Example:
* static void setup_read_write(int fd,
*/
void *io_loop(void);
+/**
+ * io_conn_fd - get the fd from a connection.
+ * @conn: the connection.
+ *
+ * Sometimes useful, eg for getsockname().
+ */
+int io_conn_fd(const struct io_conn *conn);
+
/**
* io_set_alloc - set alloc/realloc/free function for io to use.
* @allocfn: allocator function