fn add_listener(&mut self, fd: RawFd, listener: EpollListener) -> Result<()> {
        let evset = match listener {
            EpollListener::Connection { evset, .. } => evset,
            EpollListener::LocalStream(_) => EventSet::IN,
            EpollListener::HostSock => 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::LocalStream(_) => EventSet::IN,
            EpollListener::HostSock => 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 :: LocalStream ( _ ) => EventSet :: IN , EpollListener :: HostSock => 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
&mut self
fd
RawFd
listener
EpollListener