This file is indexed.

/usr/share/doc/racket/unix-socket/index.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Unix Domain Sockets</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;">&bull;</td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Unix Domain Sockets</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._top%29" class="tocsubseclink" data-pltdoc="x">Unix Domain Sockets</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-available~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unix-<wbr></wbr>socket-<wbr></wbr>available?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-connect%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unix-<wbr></wbr>socket-<wbr></wbr>connect</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-path~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unix-<wbr></wbr>socket-<wbr></wbr>path?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listen%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unix-<wbr></wbr>socket-<wbr></wbr>listen</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listener~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unix-<wbr></wbr>socket-<wbr></wbr>listener?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-accept%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unix-<wbr></wbr>socket-<wbr></wbr>accept</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.7</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<span class="nonavigation">&larr; prev</span>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">up</a>&nbsp;&nbsp;<span class="nonavigation">next &rarr;</span></span>&nbsp;</div><h2 x-source-module="(lib &quot;scribblings/socket/unix-socket.scrbl&quot;)" x-source-pkg="unix-socket-doc" x-part-tag="&quot;top&quot;"><a name="(part._top)"></a><a name="(part._unix-socket)"></a><a name="(mod-path._racket/unix-socket)"></a>Unix Domain Sockets</h2><p>Ryan Culpepper &lt;<a href="mailto:ryanc@racket-lang.org">ryanc@racket-lang.org</a>&gt;</p><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/unix-socket</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">unix-socket-lib</span></span></td></tr></table></p><p>This library provides support for <a name="(tech._unix._domain._socket)"></a><span style="font-style: italic">unix domain sockets</span>
(specifically, sockets with family <span class="stt">AF_UNIX</span> and type
<span class="stt">SOCK_STREAM</span>).</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._racket/unix-socket..rkt)._unix-socket-available~3f))"></a><span title="Provided from: racket/unix-socket | Package: unix-socket-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-available~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">unix-socket-available?</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A boolean value that indicates whether unix domain sockets are
available and supported on the current platform. The supported
platforms are Linux, Mac OS X, and variants of BSD. This library does
not currently support other Unix variants, and Windows does not have
unix domain sockets.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/unix-socket..rkt)._unix-socket-connect))"></a><span title="Provided from: racket/unix-socket | Package: unix-socket-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-connect%29%29" class="RktValDef RktValLink" data-pltdoc="x">unix-socket-connect</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">socket-path</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">socket-path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-path~3f%29%29" class="RktValLink" data-pltdoc="x">unix-socket-path?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Connects to the unix domain socket associated with
<span class="RktVar">socket-path</span> and returns an input port and output port for
communicating with the socket. The connection is closed when both
ports are closed.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/unix-socket..rkt)._unix-socket-path~3f))"></a><span title="Provided from: racket/unix-socket | Package: unix-socket-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-path~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">unix-socket-path?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a valid unix domain socket path
for the current system. There are two kinds of socket paths:
filesystem paths and abstract socket names.</div></p><ul><li><p>If <span class="RktVar">v</span> is a path (<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span>), the length of
<span class="RktVar">v</span>&rsquo;s corresponding absolute path must be less than or equal to
the platform-specific length (108 bytes on Linux, 104 bytes on BSD and
Mac OS X). Example: <span class="RktVal">"/tmp/mysocket"</span>.</p></li><li><p>If <span class="RktVar">v</span> is a bytestring (<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span>), it represents
an abstract socket name, supported on ly on Linux. The first byte of
<span class="RktVar">v</span> must be NUL, and its length must be less than or equal to
108 bytes. Such a value refers to a socket in the Linux abstract
socket namespace. Example: <span class="RktVal">#"\0mysocket"</span>.</p><p>Note that NUL bytes are allowed in abstract socket names. For example,
<span class="RktVal">#"\0abc"</span> and <span class="RktVal">#"\0abc\0"</span> are both valid&#8212;<wbr></wbr>and
different&#8212;<wbr></wbr>abstract socket names.</p></li></ul><p>Otherwise, returns <span class="RktVal">#f</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/unix-socket..rkt)._unix-socket-listen))"></a><span title="Provided from: racket/unix-socket | Package: unix-socket-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listen%29%29" class="RktValDef RktValLink" data-pltdoc="x">unix-socket-listen</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">socket-path</span><span class="hspace">&nbsp;</span>[<span class="RktVar">backlog</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listener~3f%29%29" class="RktValLink" data-pltdoc="x">unix-socket-listener?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">socket-path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-path~3f%29%29" class="RktValLink" data-pltdoc="x">unix-socket-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">backlog</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">4</span></td></tr></table></blockquote></div><div class="SIntrapara">Listen for connections on a unix domain socket bound to
<span class="RktVar">socket-path</span>, returning a listener that can be used to accept
incoming connections.</div></p><p>If <span class="RktVar">socket-path</span> refers to a filesystem path, binding the
socket creates a file that must be deleted separately from closing the
listener.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/unix-socket..rkt)._unix-socket-listener~3f))"></a><span title="Provided from: racket/unix-socket | Package: unix-socket-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listener~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">unix-socket-listener?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a unix socket listener created
with <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listen%29%29" class="RktValLink" data-pltdoc="x">unix-socket-listen</a></span>; <span class="RktVal">#f</span> otherwise.</div></p><p>A unix socket listener acts as a synchronizable event. It is ready
when a client connection is ready to be accepted (see
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-accept%29%29" class="RktValLink" data-pltdoc="x">unix-socket-accept</a></span>), and its synchronization result is the
listener itself.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/unix-socket..rkt)._unix-socket-accept))"></a><span title="Provided from: racket/unix-socket | Package: unix-socket-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-accept%29%29" class="RktValDef RktValLink" data-pltdoc="x">unix-socket-accept</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">listener</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym">output-port</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">listener</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-listener~3f%29%29" class="RktValLink" data-pltdoc="x">unix-socket-listener?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Accepts a client connection for <span class="RktVar">listener</span>. If no client
connection is waiting to be accepted, the call to
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Funix-socket..rkt%29._unix-socket-accept%29%29" class="RktValLink" data-pltdoc="x">unix-socket-accept</a></span> will block.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<span class="nonavigation">&larr; prev</span>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">up</a>&nbsp;&nbsp;<span class="nonavigation">next &rarr;</span></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>