Move `define-inlinable' into the default namespace
[bpt/guile.git] / doc / ref / posix.texi
index 468eaea..469c4da 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010
+@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -2456,7 +2456,7 @@ When given, @var{hint_family} should specify the requested
 address family, e.g., @code{AF_INET6}.  Similarly,
 @var{hint_socktype} should specify the requested socket type
 (e.g., @code{SOCK_DGRAM}), and @var{hint_protocol} should
-specify the requested protocol (its value is interpretered
+specify the requested protocol (its value is interpreted
 as in calls to @code{socket}).
 
 On error, an exception with key @code{getaddrinfo-error} is
@@ -2497,6 +2497,12 @@ resolve the name.
 Either @var{name} does not resolve for the supplied parameters,
 or neither @var{name} nor @var{service} were supplied.
 
+@item EAI_NODATA
+This non-POSIX error code can be returned on GNU systems when a
+request was actually made but returned no data, meaning
+that no address is associated with @var{name}.  Error handling
+code should be prepared to handle it when it is defined.
+
 @item EAI_SERVICE
 @var{service} was not recognized for the specified socket type.
 
@@ -2857,7 +2863,7 @@ The following functions access the fields of a socket address object,
 
 @deffn {Scheme Procedure} sockaddr:fam sa
 Return the address family from socket address object @var{sa}.  This
-is one of the @code{AF} constants (eg. @code{AF_INET}).
+is one of the @code{AF} constants (e.g.@: @code{AF_INET}).
 @end deffn
 
 @deffn {Scheme Procedure} sockaddr:path sa
@@ -3116,7 +3122,7 @@ either a socket address object, or arguments the same as
 (@pxref{Network Socket Address}).  The return value is unspecified.
 
 Generally a socket is only explicitly bound to a particular address
-when making a server, ie. to listen on a particular port.  For an
+when making a server, i.e.@: to listen on a particular port.  For an
 outgoing connection the system will assign a local address
 automatically, if not already bound.
 
@@ -3171,7 +3177,7 @@ Note that on many systems the address of a socket in the
 @deffn {Scheme Procedure} getpeername sock
 @deffnx {C Function} scm_getpeername (sock)
 Return a socket address object which is where @var{sock} is connected
-to, ie. the remote endpoint.
+to, i.e.@: the remote endpoint.
 
 Note that on many systems the address of a socket in the
 @code{AF_UNIX} namespace cannot be read.
@@ -3182,7 +3188,7 @@ Note that on many systems the address of a socket in the
 Receive data from a socket port.
 @var{sock} must already
 be bound to the address from which data is to be received.
-@var{buf} is a string into which
+@var{buf} is a bytevector into which
 the data will be written.  The size of @var{buf} limits
 the amount of
 data which can be received: in the case of packet
@@ -3209,7 +3215,7 @@ any unread buffered port data is ignored.
 @vindex MSG_OOB
 @vindex MSG_PEEK
 @vindex MSG_DONTROUTE
-Transmit the string @var{message} on a socket port @var{sock}.
+Transmit bytevector @var{message} on socket port @var{sock}.
 @var{sock} must already be bound to a destination address.  The value
 returned is the number of bytes transmitted---it's possible for this
 to be less than the length of @var{message} if the socket is set to be
@@ -3221,17 +3227,18 @@ file descriptor:
 any unflushed buffered port data is ignored.
 @end deffn
 
-@deffn {Scheme Procedure} recvfrom! sock str [flags [start [end]]]
-@deffnx {C Function} scm_recvfrom (sock, str, flags, start, end)
+@deffn {Scheme Procedure} recvfrom! sock buf [flags [start [end]]]
+@deffnx {C Function} scm_recvfrom (sock, buf, flags, start, end)
 Receive data from socket port @var{sock}, returning the originating
 address as well as the data.  This function is usually for datagram
 sockets, but can be used on stream-oriented sockets too.
 
-The data received is stored in the given @var{str}, the whole string
-or just the region between the optional @var{start} and @var{end}
-positions.  The size of @var{str} limits the amount of data which can
-be received.  For datagram protocols if a packet larger than this is
-received then excess bytes are irrevocably lost.
+The data received is stored in bytevector @var{buf}, using
+either the whole bytevector or just the region between the optional
+@var{start} and @var{end} positions.  The size of @var{buf}
+limits the amount of data that can be received.  For datagram
+protocols if a packet larger than this is received then excess
+bytes are irrevocably lost.
 
 The return value is a pair.  The @code{car} is the number of bytes
 read.  The @code{cdr} is a socket address object (@pxref{Network
@@ -3261,7 +3268,7 @@ application may need to use @code{select}, @code{O_NONBLOCK} or
 @deffnx {Scheme Procedure} sendto sock message AF_INET6 ipv6addr port [flowinfo [scopeid [flags]]]
 @deffnx {Scheme Procedure} sendto sock message AF_UNIX path [flags]
 @deffnx {C Function} scm_sendto (sock, message, fam, address, args_and_flags)
-Transmit the string @var{message} as a datagram on socket port
+Transmit bytevector @var{message} as a datagram socket port
 @var{sock}.  The destination is specified either as a socket address
 object, or as arguments the same as would be taken by
 @code{make-socket-address} to create such an object (@pxref{Network