pub fn register_socket(&mut self,
                           socket: &AsRawSocket,
                           poll: &Poll,
                           token: Token,
                           events: Ready,
                           opts: PollOpt,
                           registration: &Mutex<Option<poll::Registration>>)
                           -> io::Result<()> {
        trace!("register {:?} {:?}", token, events);
        unsafe {
            self.binding.register_socket(socket, token, poll)?;
        }

        let (r, s) = poll::new_registration(poll, token, events, opts);
        self.readiness = Some(s);
        *registration.lock().unwrap() = Some(r);
        Ok(())
    }
/// Implementation of the `Evented::register` function essentially.
///
/// Returns an error if we're already registered with another event loop,
/// and otherwise just reassociates ourselves with the event loop to
/// possible change tokens.
Implementation of the `Evented::register` function essentially.
Returns an error if we're already registered with another event loop,
and otherwise just reassociates ourselves with the event loop to
possible change tokens.
Implementation of the ` Evented :: register ` function essentially . Returns an error if we ' re already registered with another event loop and otherwise just reassociates ourselves with the event loop to possible change tokens .
pub fn register_socket(&mut self,
                           socket: &AsRawSocket,
                           poll: &Poll,
                           token: Token,
                           events: Ready,
                           opts: PollOpt,
                           registration: &Mutex<Option<poll::Registration>>)
                           -> io::Result<()> {
        trace!("register {:?} {:?}", token, events);
        unsafe {
            self.binding.register_socket(socket, token, poll)?;
        }
        let (r, s) = poll::new_registration(poll, token, events, opts);
        self.readiness = Some(s);
        *registration.lock().unwrap() = Some(r);
        Ok(())
    }
pub fn register_socket ( & mut self , socket : & AsRawSocket , poll : & Poll , token : Token , events : Ready , opts : PollOpt , registration : & Mutex < Option < poll :: Registration > > ) -> io :: Result < ( ) > { trace ! ( " " token events ) ; unsafe { self . binding . register_socket ( socket , token , poll ) ? ; } let ( r , s ) = poll :: new_registration ( poll , token , events , opts ) ; self . readiness = Some ( s ) ; * registration . lock ( ) . unwrap ( ) = Some ( r ) ; Ok ( ( ) ) }
Implementation of the `Evented::register` function essentially.
Implementation of the ` Evented :: register ` function essentially .
&mut self
socket
&AsRawSocket
poll
&Poll
token
Token
events
Ready
opts
PollOpt
registration
&Mutex<Option<poll::Registration>>
&mut self
socket
&AsRawSocket
poll
&Poll
token
Token
events
Ready
opts
PollOpt
registration
&Mutex<Option<poll::Registration>>