Struct std::old_io::net::pipe::UnixAcceptorUnstable [-] [+] [src]

pub struct UnixAcceptor {
    // some fields omitted
}

A value that can accept named pipe connections, returned from listen().

Methods

impl UnixAcceptor

fn set_timeout(&mut self, timeout_ms: Option<u64>)

Sets a timeout for this acceptor, after which accept() will no longer block indefinitely.

The argument specified is the amount of time, in milliseconds, into the future after which all invocations of accept() will not block (and any pending invocation will return). A value of None will clear any existing timeout.

When using this method, it is likely necessary to reset the timeout as appropriate, the timeout specified is specific to this object, not specific to the next request.

fn close_accept(&mut self) -> IoResult<()>

Closes the accepting capabilities of this acceptor.

This function has the same semantics as TcpAcceptor::close_accept, and more information can be found in that documentation.

Trait Implementations

impl Acceptor<UnixStream> for UnixAcceptor

fn accept(&mut self) -> IoResult<UnixStream>

fn incoming<'r>(&'r mut self) -> IncomingConnections<'r, Self>

impl Clone for UnixAcceptor

fn clone(&self) -> UnixAcceptor

Creates a new handle to this unix acceptor, allowing for simultaneous accepts.

The underlying unix acceptor will not be closed until all handles to the acceptor have been deallocated. Incoming connections will be received on at most once acceptor, the same connection will not be accepted twice.

The close_accept method will shut down all acceptors cloned from the same original acceptor, whereas the set_timeout method only affects the selector that it is called on.

This function is useful for creating a handle to invoke close_accept on to wake up any other task blocked in accept.

fn clone_from(&mut self, source: &Self)

impl AsRawFd for UnixAcceptor

fn as_raw_fd(&self) -> Fd

impl AsRawFd for UnixAcceptor

fn as_raw_fd(&self) -> Fd