Testing Availability of Network Features
To test for the availability of a given network feature, use featurep like this:
(featurep 'make-network-process '(keyword value))
The result of this form is t if it works to specify keyword with value value in make-network-process. Here are some of the keyword—value pairs you can test in this way.
(:nowait t)Non-
nilif non-blocking connect is supported.(:type datagram)Non-
nilif datagrams are supported.(:family local)Non-
nilif local (a.k.a. “UNIX domain”) sockets are supported.(:family ipv6)Non-
nilif IPv6 is supported.(:service t)Non-
nilif the system can select the port for a server.
To test for the availability of a given network option, use featurep like this:
(featurep 'make-network-process 'keyword)
The accepted keyword values are :bindtodevice, etc. For the complete list, see Network Options. This form returns non-nil if that particular network option is supported by make-network-process (or set-network-process-option).
Copyright © 1990-1996, 1998-2021 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Feature-Testing.html