Arguments: sock size &key buffer extract
This generic function is used to read from a datagram socket. You must specify a size bigger than the size of the message you expect (usually the rest of the datagram will be thrown away if it doesn't all fit).
If the buffer argument is given then it should
be a Lisp vector of some raw type (like character
or
(unsigned-byte 8)
but definitely not t
) of at least size bytes that
will be used to read in the datagram. If buffer
is not given then a fresh buffer will be created (of the type
appropriate to the format of the socket).
If extract is unspecified or nil
then the first value returned is the buffer used to read the data. If
extract is true then the first value returned is
a subsequence of the buffer, that subsequence being that part of the
buffer that contains the data just read.
The second value returned is the number of bytes read by receive-from.
In the case of an :internet
socket, the third value
returned is the 32-bit internet address of the sender of the data and
the fourth value is the port number.
In the case of a :file
socket, the third (and last)
value returned is the filename of the sender's socket (or
""
if there is no filename).
See socket.htm for general information on sockets in Allegro CL.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.