Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.sys.linux.epoll

D header file to interface with the Linux epoll API (http://man7.org/linux/man-pages/man7/epoll.7.html). Available since Linux 2.6

`EPOLL_CTL_ADD`
  Add a file descriptor to the interface.
`EPOLL_CTL_DEL`
  Remove a file descriptor from the interface.
`EPOLL_CTL_MOD`
  Change file descriptor epoll_event structure.
nothrow @nogc @system int `epoll_create`(int `size`);
  Creates an epoll instance.
  Parameters:

  int `size` | a hint specifying the number of file descriptors to be associated with the new instance. T

  Returns:
  an fd for the new instance. The fd returned by epoll_create() should be closed with close().
  See Also:
  epoll_create1 (int flags)
nothrow @nogc @system int `epoll_create1`(int `flags`);
  Creates an epoll instance.
  Parameters:

  int `flags` | a specified flag. If flags is 0, then, other than the fact that the obsolete size argument is dropped, epoll_create1() is the same as epoll_create().

  Returns:
  an fd for the new instance. The fd returned by epoll_create() should be closed with close().
  See Also:
  epoll_create (int size)
nothrow @nogc @system int `epoll_ctl`(int `epfd`, int `op`, int `fd`, epoll_event* `event`);
  Manipulate an epoll instance
  Parameters:

  int `epfd` | an epoll file descriptor instance
  int `op` | one of the EPOLL_CTL_* constants
  int `fd` | target file descriptor of the operation
  epoll_event* `event` | describes which events the caller is interested in and any associated user dat

  Returns:
  0 in case of success, -1 in case of error ( the "errno" variable will contain the specific error code )
nothrow @nogc @system int `epoll_wait`(int `epfd`, epoll_event* `events`, int `maxevents`, int `timeout`);
  Wait for events on an epoll instance.
  Parameters:

  int `epfd` | an epoll file descriptor instance
  epoll_event* `events` | a buffer that will contain triggered events
  int `maxevents` | the maximum number of events to be returned ( usually size of "events" )
  int `timeout` | specifies the maximum wait time in milliseconds (-1 == infinite)

  Returns:
  the number of triggered events returned in "events" buffer. Or -1 in case of error with the "errno" variable set to the specific error code.
nothrow @nogc @system int `epoll_pwait`(int `epfd`, epoll_event* `events`, int `maxevents`, int `timeout`, const sigset_t* `ss`);
  Wait for events on an epoll instance
  Parameters:

  int `epfd` | an epoll file descriptor instance
  epoll_event* `events` | a buffer that will contain triggered events
  int `maxevents` | the maximum number of events to be returned ( usually size of "events" )
  int `timeout` | specifies the maximum wait time in milliseconds (-1 == infinite)
  sigset_t* `ss` | a signal set. May be specified as null, in which case epoll_pwait() is equivalent to epoll_wait().

  Returns:
  the number of triggered events returned in "events" buffer. Or -1 in case of error with the "errno" variable set to the specific error code.

Copyright © 1999-2022 by the D Language Foundation | Page generated by Ddoc on Thu Dec 15 17:30:09 2022