summaryrefslogtreecommitdiff
path: root/devdocs/elisp/network-feature-testing.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/network-feature-testing.html
new repository
Diffstat (limited to 'devdocs/elisp/network-feature-testing.html')
-rw-r--r--devdocs/elisp/network-feature-testing.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/elisp/network-feature-testing.html b/devdocs/elisp/network-feature-testing.html
new file mode 100644
index 00000000..250baf6b
--- /dev/null
+++ b/devdocs/elisp/network-feature-testing.html
@@ -0,0 +1,10 @@
+ <h4 class="subsection">Testing Availability of Network Features</h4> <p>To test for the availability of a given network feature, use <code>featurep</code> like this: </p> <div class="example"> <pre class="example">(featurep 'make-network-process '(<var>keyword</var> <var>value</var>))
+</pre>
+</div> <p>The result of this form is <code>t</code> if it works to specify <var>keyword</var> with value <var>value</var> in <code>make-network-process</code>. Here are some of the <var>keyword</var>—<var>value</var> pairs you can test in this way. </p> <dl compact> <dt><code>(:nowait t)</code></dt> <dd><p>Non-<code>nil</code> if non-blocking connect is supported. </p></dd> <dt><code>(:type datagram)</code></dt> <dd><p>Non-<code>nil</code> if datagrams are supported. </p></dd> <dt><code>(:family local)</code></dt> <dd><p>Non-<code>nil</code> if local (a.k.a. “UNIX domain”) sockets are supported. </p></dd> <dt><code>(:family ipv6)</code></dt> <dd><p>Non-<code>nil</code> if IPv6 is supported. </p></dd> <dt><code>(:service t)</code></dt> <dd><p>Non-<code>nil</code> if the system can select the port for a server. </p></dd> </dl> <p>To test for the availability of a given network option, use <code>featurep</code> like this: </p> <div class="example"> <pre class="example">(featurep 'make-network-process '<var>keyword</var>)
+</pre>
+</div> <p>The accepted <var>keyword</var> values are <code>:bindtodevice</code>, etc. For the complete list, see <a href="network-options">Network Options</a>. This form returns non-<code>nil</code> if that particular network option is supported by <code>make-network-process</code> (or <code>set-network-process-option</code>). </p><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Feature-Testing.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Feature-Testing.html</a>
+ </p>
+</div>