Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | initial documentation |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e677329d3d6ed5fed17195de9f027c7c |
User & Date: | murphy 2017-08-21 22:54:05 |
Context
2017-08-21
| ||
23:20 | updated release information file check-in: de9e102759 user: murphy tags: trunk, v1.0.0 | |
22:54 | initial documentation check-in: e677329d3d user: murphy tags: trunk | |
22:24 | initial working code check-in: c3946a8616 user: murphy tags: trunk | |
Changes
Added address-info.wiki.
1 +<h1>Address Info API</h1> 2 + 3 +This CHICKEN module exposes <tt>getaddrinfo(3)</tt> functionality to Scheme. 4 + 5 +<verbatim> 6 + (require-extension address-info) 7 +</verbatim> 8 + 9 +<h2>Address Info Record</h2> 10 + 11 +<verbatim> 12 + (define-record-type address-info 13 + (make-address-info family type host port) 14 + address-info? 15 + [family address-info-family] 16 + [type address-info-type] 17 + [host address-info-host] 18 + [port address-info-port]) 19 +</verbatim> 20 + 21 +Descriptor for an internet socket address. The family is either 22 +<tt>'ipv4</tt> or <tt>'ipv6</tt>. The type is either <tt>'tcp</tt>, 23 +<tt>'udp</tt> or <tt>'raw</tt>. The host is a numeric address encoded as 24 +a string. The port is a either a positive integer or <tt>#f</tt>. 25 + 26 +<h2>Address Info Lookup</h2> 27 + 28 +<verbatim> 29 + (address-infos 30 + HOST [#:port PORT] 31 + [#:family FAMILY] [#:type TYPE] 32 + [#:server? BOOLEAN] [#:numeric? BOOLEAN]) 33 + => (list ADDRESS-INFO ...) | #f 34 +</verbatim> 35 + 36 +Tries to lookup socket addresses for the given host and/or port. If the 37 +lookup is successful, the procedure returns a list of address 38 +information records. Otherwise it returns <tt>#f</tt>. 39 + 40 +For a successful lookup you must at least specify a hostname or a port. 41 +If no hostname is specified, the function defaults to server mode lookup 42 +and will return wildcard addresses. This behaviour can be changed using 43 +the <tt>#:server?</tt> flag. 44 + 45 +By default, the procedure will return address information records for 46 +all suitable supported protocol families and socket types. The 47 +<tt>#:family</tt> argument may be used to filter for <tt>'ipv4</tt> or 48 +<tt>'ipv6</tt> addresses. The <tt>#:type</tt> argument may be used to 49 +filter for <tt>'tcp</tt> / <tt>'stream</tt>, <tt>'udp</tt> / 50 +<tt>'datagram</tt> or <tt>'raw</tt> socket types. 51 + 52 +Unless the <tt>#:numeric?</tt> flag is set to a true value, the 53 +procedure will convert hostnames into numeric network addresses.