Struct curl::multi::WaitFd
[−]
[src]
pub struct WaitFd { /* fields omitted */ }
File descriptor to wait on for use with the wait
method on a multi handle.
Methods
impl WaitFd
[src]
fn new() -> WaitFd
Constructs an empty (invalid) WaitFd.
fn set_fd(&mut self, fd: Socket)
Set the file descriptor to wait for.
fn poll_on_read(&mut self, val: bool) -> &mut WaitFd
Indicate that the socket should poll on read events such as new data received.
Corresponds to CURL_WAIT_POLLIN
.
fn poll_on_priority_read(&mut self, val: bool) -> &mut WaitFd
Indicate that the socket should poll on high priority read events such as out of band data.
Corresponds to CURL_WAIT_POLLPRI
.
fn poll_on_write(&mut self, val: bool) -> &mut WaitFd
Indicate that the socket should poll on write events such as the socket being clear to write without blocking.
Corresponds to CURL_WAIT_POLLOUT
.
fn received_read(&self) -> bool
After a call to wait
, returns true
if poll_on_read
was set and a
read event occured.
fn received_priority_read(&self) -> bool
After a call to wait
, returns true
if poll_on_priority_read
was set and a
priority read event occured.
fn received_write(&self) -> bool
After a call to wait
, returns true
if poll_on_write
was set and a
write event occured.