diff --git a/include/proto/fd.h b/include/proto/fd.h index 38c12b687..526f89595 100644 --- a/include/proto/fd.h +++ b/include/proto/fd.h @@ -241,6 +241,14 @@ static inline int fd_send_polled(const int fd) return (unsigned)fdtab[fd].state & FD_EV_POLLED_W; } +/* + * returns true if the FD is active for recv or send + */ +static inline int fd_active(const int fd) +{ + return (unsigned)fdtab[fd].state & FD_EV_ACTIVE_RW; +} + /* Disable processing recv events on fd */ static inline void fd_stop_recv(int fd) {