fn add_listener(&mut self, fd: RawFd, listener: EpollListener) -> Result<()> {
        let evset = match listener {
            EpollListener::Connection { evset, .. } => evset,
            EpollListener::WrapUnix { .. } => EventSet::IN,
            EpollListener::WrapTcp { .. } => EventSet::IN,
        };

        self.epoll
            .ctl(
                ControlOperation::Add,
                fd,
                &EpollEvent::new(evset, fd as u64),
            )
            .map(|_| {
                self.listener_map.insert(fd, listener);
            })
            .map_err(Error::EpollAdd)?;

        Ok(())
    }
/// Register a new epoll listener under the muxer's nested epoll FD.
Register a new epoll listener under the muxer's nested epoll FD.
Register a new epoll listener under the muxer ' s nested epoll FD .
fn add_listener(&mut self, fd: RawFd, listener: EpollListener) -> Result<()> {
        let evset = match listener {
            EpollListener::Connection { evset, .. } => evset,
            EpollListener::WrapUnix { .. } => EventSet::IN,
            EpollListener::WrapTcp { .. } => EventSet::IN,
        };
        self.epoll
            .ctl(
                ControlOperation::Add,
                fd,
                &EpollEvent::new(evset, fd as u64),
            )
            .map(|_| {
                self.listener_map.insert(fd, listener);
            })
            .map_err(Error::EpollAdd)?;
        Ok(())
    }
fn add_listener ( & mut self , fd : RawFd , listener : EpollListener ) -> Result < ( ) > { let evset = match listener { EpollListener :: Connection { evset , .. } => evset , EpollListener :: WrapUnix { .. } => EventSet :: IN , EpollListener :: WrapTcp { .. } => EventSet :: IN , } ; self . epoll . ctl ( ControlOperation :: Add , fd , & EpollEvent :: new ( evset , fd as u64 ) , ) . map ( | _ | { self . listener_map . insert ( fd , listener ) ; } ) . map_err ( Error :: EpollAdd ) ? ; Ok ( ( ) ) }
Register a new epoll listener under the muxer's nested epoll FD.
Register a new epoll listener under the muxer ' s nested epoll FD .
&mut self
fd
RawFd
listener
EpollListener