447 lines
28 KiB
HTML
447 lines
28 KiB
HTML
|
<?xml version="1.0" encoding="utf-8" ?>
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<!-- This file is generated by Nim. -->
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
||
|
<!-- 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=">
|
||
|
|
||
|
<!-- 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'/>
|
||
|
|
||
|
<!-- CSS -->
|
||
|
<title>chronos/osutils</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
|
||
|
|
||
|
<script type="text/javascript" src="../dochack.js"></script>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
function main() {
|
||
|
var pragmaDots = document.getElementsByClassName("pragmadots");
|
||
|
for (var i = 0; i < pragmaDots.length; i++) {
|
||
|
pragmaDots[i].onclick = function(event) {
|
||
|
// Hide tease
|
||
|
event.target.parentNode.style.display = "none";
|
||
|
// Show actual
|
||
|
event.target.parentNode.nextElementSibling.style.display = "inline";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function switchTheme(e) {
|
||
|
if (e.target.checked) {
|
||
|
document.documentElement.setAttribute('data-theme', 'dark');
|
||
|
localStorage.setItem('theme', 'dark');
|
||
|
} else {
|
||
|
document.documentElement.setAttribute('data-theme', 'light');
|
||
|
localStorage.setItem('theme', 'light');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
|
||
|
if (toggleSwitch !== null) {
|
||
|
toggleSwitch.addEventListener('change', switchTheme, false);
|
||
|
}
|
||
|
|
||
|
var currentTheme = localStorage.getItem('theme');
|
||
|
if (!currentTheme && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||
|
currentTheme = 'dark';
|
||
|
}
|
||
|
if (currentTheme) {
|
||
|
document.documentElement.setAttribute('data-theme', currentTheme);
|
||
|
|
||
|
if (currentTheme === 'dark' && toggleSwitch !== null) {
|
||
|
toggleSwitch.checked = true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
window.addEventListener('DOMContentLoaded', main);
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="document" id="documentId">
|
||
|
<div class="container">
|
||
|
<h1 class="title">chronos/osutils</h1>
|
||
|
<div class="row">
|
||
|
<div class="three columns">
|
||
|
<div class="theme-switch-wrapper">
|
||
|
<label class="theme-switch" for="checkbox">
|
||
|
<input type="checkbox" id="checkbox" />
|
||
|
<div class="slider round"></div>
|
||
|
</label>
|
||
|
<em>Dark Mode</em>
|
||
|
</div>
|
||
|
<div id="global-links">
|
||
|
<ul class="simple">
|
||
|
<li>
|
||
|
<a href="../theindex.html">Index</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="searchInputDiv">
|
||
|
Search: <input type="text" id="searchInput"
|
||
|
onkeyup="search()" />
|
||
|
</div>
|
||
|
<div>
|
||
|
Group by:
|
||
|
<select onchange="groupBy(this.value)">
|
||
|
<option value="section">Section</option>
|
||
|
<option value="type">Type</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
<ul class="simple simple-toc" id="toc-list">
|
||
|
<li>
|
||
|
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
|
||
|
<ul class="simple simple-toc-section">
|
||
|
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
|
||
|
<ul class="simple simple-toc-section">
|
||
|
<li><a class="reference" href="#DescriptorFlag"
|
||
|
title="DescriptorFlag {.pure.} = enum
|
||
|
CloseOnExec, NonBlock">DescriptorFlag</a></li>
|
||
|
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a class="reference reference-toplevel" href="#10" id="60">Consts</a>
|
||
|
<ul class="simple simple-toc-section">
|
||
|
<li><a class="reference" href="#AsyncDescriptorDefault"
|
||
|
title="AsyncDescriptorDefault = {DescriptorFlag.CloseOnExec, DescriptorFlag.NonBlock}">AsyncDescriptorDefault</a></li>
|
||
|
<li><a class="reference" href="#MaxSignalEventLength"
|
||
|
title="MaxSignalEventLength = 64">MaxSignalEventLength</a></li>
|
||
|
<li><a class="reference" href="#MaxSignalSuffixLength"
|
||
|
title="MaxSignalSuffixLength = 21">MaxSignalSuffixLength</a></li>
|
||
|
<li><a class="reference" href="#PipeHeaderName"
|
||
|
title="PipeHeaderName = r"\\.\pipe\LOCAL\chronos\"">PipeHeaderName</a></li>
|
||
|
<li><a class="reference" href="#SignalPrefixName"
|
||
|
title="SignalPrefixName = r"Local\chronos-events-"">SignalPrefixName</a></li>
|
||
|
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
|
||
|
<ul class="simple simple-toc-section">
|
||
|
<ul class="simple nested-toc-section">acceptConn
|
||
|
<li><a class="reference" href="#acceptConn%2Ccint%2Cptr.SockAddr%2Cptr.SockLen%2Cset%5BDescriptorFlag%5D"
|
||
|
title="acceptConn(a1: cint; a2: ptr SockAddr; a3: ptr SockLen; a4: set[DescriptorFlag]): Result[
|
||
|
cint, OSErrorCode]">acceptConn(a1: cint; a2: ptr SockAddr; a3: ptr SockLen; a4: set[DescriptorFlag]): Result[
|
||
|
cint, OSErrorCode]</a></li>
|
||
|
|
||
|
</ul>
|
||
|
<ul class="simple nested-toc-section">closeFd
|
||
|
<li><a class="reference" href="#closeFd%2Ccint"
|
||
|
title="closeFd(s: cint): int">closeFd(s: cint): int</a></li>
|
||
|
<li><a class="reference" href="#closeFd%2CSocketHandle"
|
||
|
title="closeFd(s: SocketHandle): int">closeFd(s: SocketHandle): int</a></li>
|
||
|
|
||
|
</ul>
|
||
|
<ul class="simple nested-toc-section">createOsPipe
|
||
|
<li><a class="reference" href="#createOsPipe%2Cset%5BDescriptorFlag%5D%2Cset%5BDescriptorFlag%5D"
|
||
|
title="createOsPipe(readset, writeset: set[DescriptorFlag]): Result[
|
||
|
tuple[read: cint, write: cint], OSErrorCode]">createOsPipe(readset, writeset: set[DescriptorFlag]): Result[
|
||
|
tuple[read: cint, write: cint], OSErrorCode]</a></li>
|
||
|
|
||
|
</ul>
|
||
|
<ul class="simple nested-toc-section">getDescriptorInheritance
|
||
|
<li><a class="reference" href="#getDescriptorInheritance%2Ccint"
|
||
|
title="getDescriptorInheritance(s: cint): Result[bool, OSErrorCode]">getDescriptorInheritance(s: cint): Result[bool, OSErrorCode]</a></li>
|
||
|
|
||
|
</ul>
|
||
|
<ul class="simple nested-toc-section">setDescriptorBlocking
|
||
|
<li><a class="reference" href="#setDescriptorBlocking%2Ccint%2Cbool"
|
||
|
title="setDescriptorBlocking(s: cint; value: bool): Result[void, OSErrorCode]">setDescriptorBlocking(s: cint; value: bool): Result[void, OSErrorCode]</a></li>
|
||
|
<li><a class="reference" href="#setDescriptorBlocking%2CSocketHandle%2Cbool"
|
||
|
title="setDescriptorBlocking(s: SocketHandle; value: bool): Result[void, OSErrorCode]">setDescriptorBlocking(s: SocketHandle; value: bool): Result[void, OSErrorCode]</a></li>
|
||
|
|
||
|
</ul>
|
||
|
<ul class="simple nested-toc-section">setDescriptorFlags
|
||
|
<li><a class="reference" href="#setDescriptorFlags%2Ccint%2Cbool%2Cbool"
|
||
|
title="setDescriptorFlags(s: cint; nonblock, cloexec: bool): Result[void, OSErrorCode]">setDescriptorFlags(s: cint; nonblock, cloexec: bool): Result[void, OSErrorCode]</a></li>
|
||
|
|
||
|
</ul>
|
||
|
<ul class="simple nested-toc-section">setDescriptorInheritance
|
||
|
<li><a class="reference" href="#setDescriptorInheritance%2Ccint%2Cbool"
|
||
|
title="setDescriptorInheritance(s: cint; value: bool): Result[void, OSErrorCode]">setDescriptorInheritance(s: cint; value: bool): Result[void, OSErrorCode]</a></li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a class="reference reference-toplevel" href="#18" id="68">Templates</a>
|
||
|
<ul class="simple simple-toc-section">
|
||
|
<ul class="simple nested-toc-section">handleEintr
|
||
|
<li><a class="reference" href="#handleEintr.t%2Cuntyped"
|
||
|
title="handleEintr(body: untyped): untyped">handleEintr(body: untyped): untyped</a></li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</ul>
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div>
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L1"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
<div class="nine columns" id="content">
|
||
|
<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="osdefs.html">osdefs</a>, <a class="reference external" href="oserrno.html">oserrno</a>
|
||
|
</dl></div>
|
||
|
<div class="section" id="7">
|
||
|
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
||
|
<dl class="item">
|
||
|
<div id="DescriptorFlag">
|
||
|
<dt><pre><a href="osutils.html#DescriptorFlag"><span class="Identifier">DescriptorFlag</span></a> {.<span class="Identifier">pure</span>.} <span class="Other">=</span> <span class="Keyword">enum</span>
|
||
|
<span class="Identifier">CloseOnExec</span><span class="Other">,</span> <span class="Identifier">NonBlock</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L26"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L26" 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="AsyncDescriptorDefault">
|
||
|
<dt><pre><a href="osutils.html#AsyncDescriptorDefault"><span class="Identifier">AsyncDescriptorDefault</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">DescriptorFlag.CloseOnExec</span><span class="Other">,</span> <span class="DecNumber">DescriptorFlag.NonBlock</span><span class="Other">}</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L30"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L30" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="MaxSignalEventLength">
|
||
|
<dt><pre><a href="osutils.html#MaxSignalEventLength"><span class="Identifier">MaxSignalEventLength</span></a> <span class="Other">=</span> <span class="DecNumber">64</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L21"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L21" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="MaxSignalSuffixLength">
|
||
|
<dt><pre><a href="osutils.html#MaxSignalSuffixLength"><span class="Identifier">MaxSignalSuffixLength</span></a> <span class="Other">=</span> <span class="DecNumber">21</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L22"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L22" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="PipeHeaderName">
|
||
|
<dt><pre><a href="osutils.html#PipeHeaderName"><span class="Identifier">PipeHeaderName</span></a> <span class="Other">=</span> <span class="StringLit">r"\\.\pipe\LOCAL\chronos\"</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L19"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L19" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="SignalPrefixName">
|
||
|
<dt><pre><a href="osutils.html#SignalPrefixName"><span class="Identifier">SignalPrefixName</span></a> <span class="Other">=</span> <span class="StringLit">r"Local\chronos-events-"</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L20"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.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="acceptConn,cint,ptr.SockAddr,ptr.SockLen,set[DescriptorFlag]">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#acceptConn%2Ccint%2Cptr.SockAddr%2Cptr.SockLen%2Cset%5BDescriptorFlag%5D"><span class="Identifier">acceptConn</span></a><span class="Other">(</span><span class="Identifier">a1</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">a2</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">SockAddr</span><span class="Other">;</span> <span class="Identifier">a3</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">SockLen</span><span class="Other">;</span>
|
||
|
<span class="Identifier">a4</span><span class="Other">:</span> <span class="Identifier">set</span><span class="Other">[</span><a href="osutils.html#DescriptorFlag"><span class="Identifier">DescriptorFlag</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">cint</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L386"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L386" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="closeFd,cint">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#closeFd%2Ccint"><span class="Identifier">closeFd</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L380"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L380" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="closeFd,SocketHandle">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#closeFd%2CSocketHandle"><span class="Identifier">closeFd</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">SocketHandle</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L383"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L383" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="createOsPipe,set[DescriptorFlag],set[DescriptorFlag]">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#createOsPipe%2Cset%5BDescriptorFlag%5D%2Cset%5BDescriptorFlag%5D"><span class="Identifier">createOsPipe</span></a><span class="Other">(</span><span class="Identifier">readset</span><span class="Other">,</span> <span class="Identifier">writeset</span><span class="Other">:</span> <span class="Identifier">set</span><span class="Other">[</span><a href="osutils.html#DescriptorFlag"><span class="Identifier">DescriptorFlag</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span>
|
||
|
<span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">read</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">,</span> <span class="Identifier">write</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L414"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L414" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="getDescriptorInheritance,cint">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#getDescriptorInheritance%2Ccint"><span class="Identifier">getDescriptorInheritance</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">bool</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L368"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L368" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="setDescriptorBlocking,cint,bool">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#setDescriptorBlocking%2Ccint%2Cbool"><span class="Identifier">setDescriptorBlocking</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">bool</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L334"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L334" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="setDescriptorBlocking,SocketHandle,bool">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#setDescriptorBlocking%2CSocketHandle%2Cbool"><span class="Identifier">setDescriptorBlocking</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">SocketHandle</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">bool</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span>
|
||
|
<span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L349"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L349" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="setDescriptorFlags,cint,bool,bool">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#setDescriptorFlags%2Ccint%2Cbool%2Cbool"><span class="Identifier">setDescriptorFlags</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">nonblock</span><span class="Other">,</span> <span class="Identifier">cloexec</span><span class="Other">:</span> <span class="Identifier">bool</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span>
|
||
|
<span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L374"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L374" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
<div id="setDescriptorInheritance,cint,bool">
|
||
|
<dt><pre><span class="Keyword">proc</span> <a href="#setDescriptorInheritance%2Ccint%2Cbool"><span class="Identifier">setDescriptorInheritance</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">bool</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Result</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">,</span> <span class="Identifier">OSErrorCode</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>.}</pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L353"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L353" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
|
||
|
</dl></div>
|
||
|
<div class="section" id="18">
|
||
|
<h1><a class="toc-backref" href="#18">Templates</a></h1>
|
||
|
<dl class="item">
|
||
|
<div id="handleEintr.t,untyped">
|
||
|
<dt><pre><span class="Keyword">template</span> <a href="#handleEintr.t%2Cuntyped"><span class="Identifier">handleEintr</span></a><span class="Other">(</span><span class="Identifier">body</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
|
||
|
<dd>
|
||
|
|
||
|
|
||
|
<a
|
||
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/osutils.nim#L326"
|
||
|
class="link-seesrc" target="_blank">Source</a>
|
||
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/osutils.nim#L326" class="link-seesrc" target="_blank" >Edit</a>
|
||
|
|
||
|
</dd>
|
||
|
</div>
|
||
|
|
||
|
</dl></div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="twelve-columns footer">
|
||
|
<span class="nim-sprite"></span>
|
||
|
<br/>
|
||
|
<small style="color: var(--hint);">Made with Nim. Generated: 2024-11-28 08:22:46 UTC</small>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|