More Readiness events?
I see that Mio has support for:
Can we get that in Calloop as well?
I am trying to use a client server architecture with Unix Sockets. Multiple clients can connect to the server. In rust every time there is a new connection to UnixListener it get's it's own UnixStream. I would like to keep track of connections so that I can send messages to appropriate streams.
But I also need to detect when the stream has been shutdown and we know that we won't receive anymore data in it.
Is there a reason why these aren't implemented? It seems like Mio does it using EPOLLHUP, EPOLLIN, EPOLLRDHUP. Is there a way to achieve this in calloop already that I don't know about?
polling has support for is_interrupt (usually corresponds to HUP), which I think fits the bill here.
@notgull Seems like it, looks like it maintains an extra field
/// Indicates that a file descriptor or socket can read or write without blocking.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Event {
/// Key identifying the file descriptor or socket.
pub key: usize,
/// Can it do a read operation without blocking?
pub readable: bool,
/// Can it do a write operation without blocking?
pub writable: bool,
/// System-specific event data.
extra: sys::EventExtra,
}
Can calloop do something similar by maintaining an extra field in the Readiness struct and implementing is_interrupt using that? I am willing to contribute if this is something that you are interested in? I don't think this should be a breaking change?
I am willing to contribute if this is something that you are interested in?
Sorry for the delay. Yes I would be interested.