---
name: "io_tryreadtimeout"
section: "3diet"
platform: "linux"
package: "libowfat-dev"
version: "0.28-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/io_tryreadtimeout/3diet"
---

# io\_tryreadtimeout(3diet)

read from a descriptor without blocking

## NAME

io\_tryreadtimeout - read from a descriptor without blocking

## SYNTAX

**#include \<io.h\>**

int **io\_tryreadtimeout**(int64 fd,char\* buf,int64 len);

## DESCRIPTION

io\_tryreadtimeout is identical to io\_tryread, with the following exception: if

- •

  io\_tryread returns -1 (the descriptor is not ready for reading), and

- •

  the descriptor has a timeout, and

- •

  the read attempt was after the descriptor's timeout,

then io\_tryreadtimeout instead returns -2, with errno set to ETIMEDOUT.

## SEE ALSO

[io\_nonblock(3)](/io_nonblock/3.md), [io\_waitread(3)](/io_waitread/3.md), [io\_tryread(3)](/io_tryread/3.md)
