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

# io\_trywritetimeout(3diet)

write to a descriptor without blocking

## NAME

io\_trywritetimeout - write to a descriptor without blocking

## SYNTAX

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

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

## DESCRIPTION

io\_trywritetimeout is identical to io\_trywrite, with the following exception: if

- •

  io\_trywrite returns -1 (the descriptor is not ready for writing), and

- •

  the descriptor has a timeout, and

- •

  the write attempt was after the descriptor's timeout,

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

## SEE ALSO

[io\_nonblock(3)](/io_nonblock/3.md), io\_waitwrite(3), [io\_trywrite(3)](/io_trywrite/3.md)
