X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Fio.h;h=6248fec02c2e5c5ae3d42e65d80eb8483af1d5aa;hp=067a69c1dec441a752508dfe50ee8f83b8421466;hb=8700faf27fe4cf9554fec2260bdabd67eabf69ae;hpb=e40f5c50a7a930fc98974936b7366b498ebf984c diff --git a/ccan/io/io.h b/ccan/io/io.h index 067a69c1..6248fec0 100644 --- a/ccan/io/io.h +++ b/ccan/io/io.h @@ -491,6 +491,14 @@ struct io_plan io_close_cb(struct io_conn *, void *unused); */ 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