123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>std/epoll</title>
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
- <!-- JS -->
- <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">std/epoll</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </label>
- <select id="theme-select" onchange="setTheme(this.value)">
- <option value="auto">🌗 Match OS</option>
- <option value="dark">🌑 Dark</option>
- <option value="light">🌕 Light</option>
- </select>
- </div>
- <div id="global-links">
- <ul class="simple-boot">
- <li><a href="manual.html">Manual</a></li>
- <li><a href="lib.html">Standard library</a></li>
- <li> <a id="indexLink" href="theindex.html">Index</a></li>
- <li><a href="compiler/theindex.html">Compiler docs</a></li>
- <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
- <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="search" id="searchInput"
- oninput="search()" />
- </div>
-
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#EpollData" title="EpollData {.importc: "epoll_data_t", header: "<sys/epoll.h>", pure, final, union.} = object
- fd* {.importc: "fd".}: cint
- u32* {.importc: "u32".}: uint32
- u64* {.importc: "u64".}: uint64">EpollData</a></li>
- <li><a class="reference" href="#EpollEvent" title="EpollEvent {.importc: "struct epoll_event", header: "<sys/epoll.h>", pure,
- final, packed.} = object
- events*: uint32
- data*: EpollData">EpollEvent</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#EPOLL_CTL_ADD" title="EPOLL_CTL_ADD = 1">EPOLL_CTL_ADD</a></li>
- <li><a class="reference" href="#EPOLL_CTL_DEL" title="EPOLL_CTL_DEL = 2">EPOLL_CTL_DEL</a></li>
- <li><a class="reference" href="#EPOLL_CTL_MOD" title="EPOLL_CTL_MOD = 3">EPOLL_CTL_MOD</a></li>
- <li><a class="reference" href="#EPOLLERR" title="EPOLLERR = 0x00000008">EPOLLERR</a></li>
- <li><a class="reference" href="#EPOLLET" title="EPOLLET = 2147483648">EPOLLET</a></li>
- <li><a class="reference" href="#EPOLLEXCLUSIVE" title="EPOLLEXCLUSIVE = 268435456">EPOLLEXCLUSIVE</a></li>
- <li><a class="reference" href="#EPOLLHUP" title="EPOLLHUP = 0x00000010">EPOLLHUP</a></li>
- <li><a class="reference" href="#EPOLLIN" title="EPOLLIN = 0x00000001">EPOLLIN</a></li>
- <li><a class="reference" href="#EPOLLMSG" title="EPOLLMSG = 0x00000400">EPOLLMSG</a></li>
- <li><a class="reference" href="#EPOLLONESHOT" title="EPOLLONESHOT = 1073741824">EPOLLONESHOT</a></li>
- <li><a class="reference" href="#EPOLLOUT" title="EPOLLOUT = 0x00000004">EPOLLOUT</a></li>
- <li><a class="reference" href="#EPOLLPRI" title="EPOLLPRI = 0x00000002">EPOLLPRI</a></li>
- <li><a class="reference" href="#EPOLLRDBAND" title="EPOLLRDBAND = 0x00000080">EPOLLRDBAND</a></li>
- <li><a class="reference" href="#EPOLLRDHUP" title="EPOLLRDHUP = 0x00002000">EPOLLRDHUP</a></li>
- <li><a class="reference" href="#EPOLLRDNORM" title="EPOLLRDNORM = 0x00000040">EPOLLRDNORM</a></li>
- <li><a class="reference" href="#EPOLLWAKEUP" title="EPOLLWAKEUP = 536870912">EPOLLWAKEUP</a></li>
- <li><a class="reference" href="#EPOLLWRBAND" title="EPOLLWRBAND = 0x00000200">EPOLLWRBAND</a></li>
- <li><a class="reference" href="#EPOLLWRNORM" title="EPOLLWRNORM = 0x00000100">EPOLLWRNORM</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">epoll_create
- <li><a class="reference" href="#epoll_create%2Ccint" title="epoll_create(size: cint): cint">epoll_create(size: cint): cint</a></li>
- </ul>
- <ul class="simple nested-toc-section">epoll_create1
- <li><a class="reference" href="#epoll_create1%2Ccint" title="epoll_create1(flags: cint): cint">epoll_create1(flags: cint): cint</a></li>
- </ul>
- <ul class="simple nested-toc-section">epoll_ctl
- <li><a class="reference" href="#epoll_ctl%2Ccint%2Ccint%2C%2Cptr.EpollEvent" title="epoll_ctl(epfd: cint; op: cint; fd: cint | SocketHandle; event: ptr EpollEvent): cint">epoll_ctl(epfd: cint; op: cint; fd: cint | SocketHandle; event: ptr EpollEvent): cint</a></li>
- </ul>
- <ul class="simple nested-toc-section">epoll_wait
- <li><a class="reference" href="#epoll_wait%2Ccint%2Cptr.EpollEvent%2Ccint%2Ccint" title="epoll_wait(epfd: cint; events: ptr EpollEvent; maxevents: cint; timeout: cint): cint">epoll_wait(epfd: cint; events: ptr EpollEvent; maxevents: cint; timeout: cint): cint</a></li>
- </ul>
- </ul>
- </details>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc"></p>
- <div class="section" id="6">
- <h1><a class="toc-backref" href="#6">Imports</a></h1>
- <dl class="item">
- <a class="reference external" href="posix.html">posix</a>
- </dl>
- </div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <div id="EpollData">
- <dt><pre><a href="epoll.html#EpollData"><span class="Identifier">EpollData</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"epoll_data_t"</span><span class="Other">,</span> <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<sys/epoll.h>"</span><span class="Other">,</span> <span class="Identifier">pure</span><span class="Other">,</span> <span class="Identifier">final</span><span class="Other">,</span> <span class="Identifier">union</span>.} <span class="Other">=</span> <span class="Keyword">object</span>
- <span class="Identifier">fd</span><span class="Operator">*</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"fd"</span>.}<span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a>
- <span class="Identifier">u32</span><span class="Operator">*</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"u32"</span>.}<span class="Other">:</span> <a href="system.html#uint32"><span class="Identifier">uint32</span></a>
- <span class="Identifier">u64</span><span class="Operator">*</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"u64"</span>.}<span class="Other">:</span> <a href="system.html#uint64"><span class="Identifier">uint64</span></a></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L44" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L44" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EpollEvent">
- <dt><pre><a href="epoll.html#EpollEvent"><span class="Identifier">EpollEvent</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"struct epoll_event"</span><span class="Other">,</span> <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<sys/epoll.h>"</span><span class="Other">,</span> <span class="Identifier">pure</span><span class="Other">,</span>
- <span class="Identifier">final</span><span class="Other">,</span> <span class="Identifier">packed</span>.} <span class="Other">=</span> <span class="Keyword">object</span>
- <span class="Identifier">events</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#uint32"><span class="Identifier">uint32</span></a>
- <span class="Identifier">data</span><span class="Operator">*</span><span class="Other">:</span> <a href="epoll.html#EpollData"><span class="Identifier">EpollData</span></a></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L50" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L50" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="10">
- <h1><a class="toc-backref" href="#10">Consts</a></h1>
- <dl class="item">
- <div id="EPOLL_CTL_ADD">
- <dt><pre><a href="epoll.html#EPOLL_CTL_ADD"><span class="Identifier">EPOLL_CTL_ADD</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L32" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L32" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLL_CTL_DEL">
- <dt><pre><a href="epoll.html#EPOLL_CTL_DEL"><span class="Identifier">EPOLL_CTL_DEL</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L33" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L33" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLL_CTL_MOD">
- <dt><pre><a href="epoll.html#EPOLL_CTL_MOD"><span class="Identifier">EPOLL_CTL_MOD</span></a> <span class="Other">=</span> <span class="DecNumber">3</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L34" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L34" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLERR">
- <dt><pre><a href="epoll.html#EPOLLERR"><span class="Identifier">EPOLLERR</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000008</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L16" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L16" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLET">
- <dt><pre><a href="epoll.html#EPOLLET"><span class="Identifier">EPOLLET</span></a> <span class="Other">=</span> <span class="DecNumber">2147483648</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L27" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L27" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLEXCLUSIVE">
- <dt><pre><a href="epoll.html#EPOLLEXCLUSIVE"><span class="Identifier">EPOLLEXCLUSIVE</span></a> <span class="Other">=</span> <span class="DecNumber">268435456</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L24" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L24" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLHUP">
- <dt><pre><a href="epoll.html#EPOLLHUP"><span class="Identifier">EPOLLHUP</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000010</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L17" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L17" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLIN">
- <dt><pre><a href="epoll.html#EPOLLIN"><span class="Identifier">EPOLLIN</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000001</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L13" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L13" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLMSG">
- <dt><pre><a href="epoll.html#EPOLLMSG"><span class="Identifier">EPOLLMSG</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000400</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L22" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L22" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLONESHOT">
- <dt><pre><a href="epoll.html#EPOLLONESHOT"><span class="Identifier">EPOLLONESHOT</span></a> <span class="Other">=</span> <span class="DecNumber">1073741824</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L26" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L26" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLOUT">
- <dt><pre><a href="epoll.html#EPOLLOUT"><span class="Identifier">EPOLLOUT</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000004</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L15" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L15" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLPRI">
- <dt><pre><a href="epoll.html#EPOLLPRI"><span class="Identifier">EPOLLPRI</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000002</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L14" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L14" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLRDBAND">
- <dt><pre><a href="epoll.html#EPOLLRDBAND"><span class="Identifier">EPOLLRDBAND</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000080</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L19" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L19" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLRDHUP">
- <dt><pre><a href="epoll.html#EPOLLRDHUP"><span class="Identifier">EPOLLRDHUP</span></a> <span class="Other">=</span> <span class="DecNumber">0x00002000</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L23" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L23" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLRDNORM">
- <dt><pre><a href="epoll.html#EPOLLRDNORM"><span class="Identifier">EPOLLRDNORM</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000040</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L18" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L18" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLWAKEUP">
- <dt><pre><a href="epoll.html#EPOLLWAKEUP"><span class="Identifier">EPOLLWAKEUP</span></a> <span class="Other">=</span> <span class="DecNumber">536870912</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L25" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L25" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLWRBAND">
- <dt><pre><a href="epoll.html#EPOLLWRBAND"><span class="Identifier">EPOLLWRBAND</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000200</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L21" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L21" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="EPOLLWRNORM">
- <dt><pre><a href="epoll.html#EPOLLWRNORM"><span class="Identifier">EPOLLWRNORM</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000100</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L20" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L20" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <div id="epoll_create-procs-all">
- <div id="epoll_create,cint">
- <dt><pre><span class="Keyword">proc</span> <a href="#epoll_create%2Ccint"><span class="Identifier">epoll_create</span></a><span class="Other">(</span><span class="Identifier">size</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"epoll_create"</span><span class="Other">,</span>
- <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<sys/epoll.h>"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Creates an epoll instance. Returns an fd for the new instance.</p>
- <p>The "size" parameter is a hint specifying the number of file descriptors to be associated with the new instance. The fd returned by epoll_create() should be closed with close().</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L54" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L54" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="epoll_create1-procs-all">
- <div id="epoll_create1,cint">
- <dt><pre><span class="Keyword">proc</span> <a href="#epoll_create1%2Ccint"><span class="Identifier">epoll_create1</span></a><span class="Other">(</span><span class="Identifier">flags</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"epoll_create1"</span><span class="Other">,</span>
- <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<sys/epoll.h>"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- Same as epoll_create but with an FLAGS parameter. The unused SIZE parameter has been dropped.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L62" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L62" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="epoll_ctl-procs-all">
- <div id="epoll_ctl,cint,cint,,ptr.EpollEvent">
- <dt><pre><span class="Keyword">proc</span> <a href="#epoll_ctl%2Ccint%2Ccint%2C%2Cptr.EpollEvent"><span class="Identifier">epoll_ctl</span></a><span class="Other">(</span><span class="Identifier">epfd</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">;</span> <span class="Identifier">op</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">;</span> <span class="Identifier">fd</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> <span class="Operator">|</span> <a href="posix.html#SocketHandle"><span class="Identifier">SocketHandle</span></a><span class="Other">;</span>
- <span class="Identifier">event</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="epoll.html#EpollEvent"><span class="Identifier">EpollEvent</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"epoll_ctl"</span><span class="Other">,</span>
- <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<sys/epoll.h>"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Manipulate an epoll instance "epfd". Returns <tt class="docutils literal"><span class="pre"><span class="DecNumber">0</span></span></tt> in case of success, <tt class="docutils literal"><span class="pre"><span class="Operator">-</span><span class="DecNumber">1</span></span></tt> in case of error (the "errno" variable will contain the specific error code).</p>
- <p>The "op" parameter is one of the <tt class="docutils literal"><span class="pre"><span class="Identifier">EPOLL_CTL_</span><span class="Operator">*</span></span></tt> constants defined above. The "fd" parameter is the target of the operation. The "event" parameter describes which events the caller is interested in and any associated user data.</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L67" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L67" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="epoll_wait-procs-all">
- <div id="epoll_wait,cint,ptr.EpollEvent,cint,cint">
- <dt><pre><span class="Keyword">proc</span> <a href="#epoll_wait%2Ccint%2Cptr.EpollEvent%2Ccint%2Ccint"><span class="Identifier">epoll_wait</span></a><span class="Other">(</span><span class="Identifier">epfd</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">;</span> <span class="Identifier">events</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="epoll.html#EpollEvent"><span class="Identifier">EpollEvent</span></a><span class="Other">;</span> <span class="Identifier">maxevents</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">;</span>
- <span class="Identifier">timeout</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"epoll_wait"</span><span class="Other">,</span>
- <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<sys/epoll.h>"</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Wait for events on an epoll instance "epfd". 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. The "events" parameter is a buffer that will contain triggered events. The "maxevents" is the maximum number of events to be returned ( usually size of "events" ). The "timeout" parameter specifies the maximum wait time in milliseconds (-1 == infinite).</p>
- <p>This function is a cancellation point and therefore not marked with __THROW.</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/posix/epoll.nim#L77" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/posix/epoll.nim#L77" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- </div>
- </div>
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br>
- <small style="color: var(--hint);">Made with Nim. Generated: 2025-02-03 14:57:19 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|