X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-bsd-sockets%2Fsb-bsd-sockets.texinfo;h=cad46a47087c7ed5f21aeceb38a742fc50c0fdc6;hb=b27852e74e11ccc9808305a73d815a4a67d77963;hp=c72663803c93aaee3044f1b018aecc0ac5f3753a;hpb=ece943d69084c4d58ca19d48bca7450cd3e45561;p=sbcl.git diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.texinfo b/contrib/sb-bsd-sockets/sb-bsd-sockets.texinfo index c726638..cad46a4 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.texinfo +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.texinfo @@ -1,10 +1,11 @@ -@node sb-bsd-sockets -@section sb-bsd-sockets +@node Networking +@comment node-name, next, previous, up +@chapter Networking @cindex Sockets, Networking -The @code{sb-bsd-sockets} module provides a thinly disguised BSD socket -API for SBCL. Ideas stolen from the BSD socket API for C and Graham -Barr's IO::Socket classes for Perl. +The @code{sb-bsd-sockets} module provides a thinly disguised BSD +socket API for SBCL. Ideas have been stolen from the BSD socket API +for C and Graham Barr's IO::Socket classes for Perl. Sockets are represented as CLOS objects, and the API naming conventions attempt to balance between the BSD names and good lisp style. @@ -19,7 +20,7 @@ conventions attempt to balance between the BSD names and good lisp style. @end menu @node Sockets Overview -@subsection Sockets Overview +@section Sockets Overview Most of the functions are modelled on the BSD socket API. BSD sockets are widely supported, portably @emph{(``portable'' by Unix standards, at least)} @@ -35,7 +36,7 @@ Where the C API would typically return -1 and set @code{errno}, of @code{sb-bsd-sockets:socket-condition} and generally correspond one for one with possible @code{errno} values. -@item +@item We use multiple return values in many places where the C API would use pass-by-reference values. @@ -50,7 +51,7 @@ than "network-endian integers". @end itemize @node General Sockets -@subsection General Sockets +@section General Sockets @include class-sb-bsd-sockets-socket.texinfo @@ -66,10 +67,16 @@ than "network-endian integers". @include fun-sb-bsd-sockets-socket-receive.texinfo +@include fun-sb-bsd-sockets-socket-send.texinfo + @include fun-sb-bsd-sockets-socket-listen.texinfo +@include fun-sb-bsd-sockets-socket-open-p.texinfo + @include fun-sb-bsd-sockets-socket-close.texinfo +@include fun-sb-bsd-sockets-socket-shutdown.texinfo + @include fun-sb-bsd-sockets-socket-make-stream.texinfo @include fun-sb-bsd-sockets-socket-error.texinfo @@ -77,7 +84,7 @@ than "network-endian integers". @include fun-sb-bsd-sockets-non-blocking-mode.texinfo @node Socket Options -@subsection Socket Options +@section Socket Options A subset of socket options are supported, using a fairly general framework which should make it simple to add more as required - see @@ -105,7 +112,7 @@ sockopt-receive-low-water)}. @include fun-sb-bsd-sockets-sockopt-tcp-nodelay.texinfo @node INET Domain Sockets -@subsection INET Domain Sockets +@section INET Domain Sockets The TCP and UDP sockets that you know and love. Some representation issues: @@ -131,12 +138,12 @@ port, so for example, (socket-connect s #(192 168 1 1) 80). @include fun-sb-bsd-sockets-get-protocol-by-name.texinfo @node Local (Unix) Domain Sockets -@subsection Local (Unix) Domain Sockets +@section Local (Unix) Domain Sockets Local domain (@code{AF_LOCAL}) sockets are also known as Unix-domain sockets, but were renamed by POSIX presumably on the basis that they may be available on other systems too. - + A local socket address is a string, which is used to create a node in the local filesystem. This means of course that they cannot be used across a network. @@ -144,16 +151,18 @@ across a network. @include class-sb-bsd-sockets-local-socket.texinfo @node Name Service -@subsection Name Service +@section Name Service + +Presently name service is implemented by calling out to the +@code{getaddrinfo(3)} and @code{gethostinfo(3)}, or to +@code{gethostbyname(3)} @code{gethostbyaddr(3)} on platforms where +the preferred functions are not available. The exact details of +the name resolving process (for example the choice of whether +DNS or a hosts file is used for lookup) are platform dependent. -Presently name service is implemented by calling whatever -@code{gethostbyname(2)} uses. This may be any or all of -@file{/etc/hosts}, NIS, DNS, or something completely different. -Typically it's controlled by @file{/etc/nsswitch.conf}. - -Direct links to the asynchronous @code{resolver(3)} routines would be -nice to have eventually, so that we can do DNS lookups in parallel -with other things +@c Direct links to the asynchronous @code{resolver(3)} routines would be +@c nice to have eventually, so that we can do DNS lookups in parallel +@c with other things. @include class-sb-bsd-sockets-host-ent.texinfo @@ -162,5 +171,3 @@ with other things @include fun-sb-bsd-sockets-get-host-by-address.texinfo @include fun-sb-bsd-sockets-host-ent-address.texinfo - -@include fun-sb-bsd-sockets-name-service-error.texinfo