File: io_tryreadtimeout.3

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (23 lines) | stat: -rw-r--r-- 621 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.TH io_tryreadtimeout 3
.SH NAME
io_tryreadtimeout \- read from a descriptor without blocking
.SH SYNTAX
.B #include <libowfat/io.h>

int \fBio_tryreadtimeout\fP(int64 fd,char* buf,int64 len);
.SH DESCRIPTION
io_tryreadtimeout is identical to io_tryread, with the following
exception: if

.RS 0
.IP \[bu] 3
io_tryread returns -1 (the descriptor is not ready for reading), and
.IP \[bu]
the descriptor has a timeout, and
.IP \[bu]
the read attempt was after the descriptor's timeout,
.RE

then io_tryreadtimeout instead returns -2, with errno set to ETIMEDOUT.
.SH "SEE ALSO"
io_nonblock(3), io_waitread(3), io_tryread(3)