# x/io, x/os: async i/o reactor, cross-platform socket syscalls and bits · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3600508fe18ecc61ea889a65127a2641a76c2933)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3600508fe18ecc61ea889a65127a2641a76c2933

Requested commit: 3600508fe18ecc61ea889a65127a2641a76c2933

Commit: 3600508fe18ecc61ea889a65127a2641a76c2933

Tree: dcb1d00874c9abe2b465055dffba9c2cca69e896

Author: lithdew

Committer: Kenta Iwasaki

## Message

```
x/io, x/os: async i/o reactor, cross-platform socket syscalls and bits

Cross-platform versions of msghdr, sendmsg, recvmsg, linger, and iovec
were provided based on findings from glibc, musl, and Microsoft's
documentation.

Implemented initial Reactor interface for epoll (linux) which wraps
around I/O reactor subsystems such as epoll, kqueue, select, etc. across
different platforms. The Reactor interface allows for driving async I/O
in Zig applications.

A test was added for the Reactor interface to drive a TCP
client/listener socket pair.

A greatest-common-subset of possible socket initialization flags (close
socket on exec syscalls, initialize socket to be non-blocking) were
implemented.

A test was added for using sendmsg/recvmsg syscalls across different
platforms for a TCP client/listener socket pair.

```

## Parents

- [d496400cff8b025dea262a9544e1b20482233089](https://git.cafe/gitcafe/zig/commit/d496400cff8b025dea262a9544e1b20482233089?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3600508fe18ecc61ea889a65127a2641a76c2933?format=markdown)
