Common Lisp Package: IOLIB

README:

FUNCTION

Public

ADDRESS-EQUAL-P (ADDR1 ADDR2 &OPTIONAL (FAMILY INTERNET))

Returns T if both arguments are designators for the same socket address.

ADDRESS-TO-VECTOR (ADDRESS)

Convert any representation of an internet address to a vector. Allowed inputs are: unsigned 32-bit integers, strings, vectors and INET-ADDRESS objects. If the address is valid, two values are returned: the vector and the address type (:IPV4 or IPV6), otherwise NIL is returned.

ADDRESSP (ADDRESS)

Returns T if ADDRESS is an object of class ADDRESS. Does not return T for other low-level address representations.

COLON-SEPARATED-TO-VECTOR (STRING)

Convert a colon-separated IPv6 address to a (SIMPLE-ARRAY (UNSIGNED-BYTE 16) 8).

DOTTED-TO-INTEGER (ADDRESS)

Convert a dotted IPv4 address to an (UNSIGNED-BYTE 32).

DOTTED-TO-VECTOR (ADDRESS)

Convert a dotted IPv4 address to a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) 4).

ENSURE-ADDRESS (ADDRESS &KEY (FAMILY INTERNET) ABSTRACT (ERRORP T))

If FAMILY is :LOCAL, a LOCAL-ADDRESS is instantiated with ADDRESS as its NAME slot. If FAMILY is :INTERNET, an appropriate subtype of INET-ADDRESS is instantiated after guessing the address type through ADDRESS-TO-VECTOR. If the address is invalid and ERRORP is not NIL, then a CL:PARSE-ERROR is signalled, otherwise NIL is returned. When ADDRESS is already an instance of the ADDRESS class, a check is made to see if it matches the FAMILY argument and it is returned unmodified.

ENSURE-HOSTNAME (ADDRESS &KEY (IPV6 *IPV6*) (ERRORP T))

If ADDRESS is an inet-address designator, it is converted, if necessary, to an INET-ADDRESS object and returned. Otherwise it is assumed to be a host name which is then looked up in order to return its primary address as the first return value and the remaining address list as the second return value.

ENSURE-NETMASK (THING)

If THING is of type IPV4-ADDRESS it is returned as is; if keyword it must be one of :A, :B or :C otherwise it's treated as a CIDR suffix.

FD-READY-P (FD &OPTIONAL (EVENT-TYPE INPUT))

Tests file-descriptor `FD' for I/O readiness. `EVENT-TYPE' must be either :INPUT, :OUTPUT or :IO .

INET-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is an Inet address object.

INTEGER-TO-DOTTED (INTEGER)

Convert an (UNSIGNED-BYTE 32) IPv4 address to a dotted string.

INTEGER-TO-VECTOR (IPADDR)

Convert a 32-bit unsigned integer to a vector.

INTERFACE-INDEX (INTERFACE)

Return the OS index of a network interface.

INTERFACE-NAME (INTERFACE)

Return the name of an network interface.

IPV4-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is an IPv4 address object.

IPV6-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is an IPv6 address object.

IPV6-ADMIN-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a admin-local multicast IPv6 address.

IPV6-GLOBAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a global multicast IPv6 address.

IPV6-GLOBAL-UNICAST-P (ADDRESS)

Returns T if ADDRESS is an global unicasst IPv6 address.

IPV6-INTERFACE-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an interface-local IPv6 address.

IPV6-IPV4-MAPPED-P (ADDRESS)

Returns T if ADDRESS is an IPv6 address representing an IPv4 mapped address.

IPV6-MULTICAST-TYPE (ADDRESS)

Returns the multicast type of ADDRESS or NIL if it's not a multicast address.

IPV6-ORGANIZATION-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an organization-local multicast IPv6 address.

IPV6-RESERVED-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a reserved multicast IPv6 address.

IPV6-SITE-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an site-local multicast IPv6 address.

IPV6-SITE-LOCAL-UNICAST-P (ADDRESS)

Returns T if ADDRESS is an site-local unicast IPv6 address.

IPV6-SOLICITED-NODE-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a solicited-node multicast IPv6 address.

IPV6-TRANSIENT-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a transient multicast IPv6 address.

IPV6-UNASSIGNED-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an unassigned multicast IPv6 address.

IPV6-UNICAST-TYPE (ADDRESS)

Returns the unicast type of ADDRESS or NIL if it's not a unicast address.

LIST-NETWORK-INTERFACES

Returns a list of network interfaces currently available.

LOCAL-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is a local address object.

LOOKUP-HOSTNAME (HOST &KEY (IPV6 *IPV6*))

Looks up a host by name or address. IPV6 determines the IPv6 behaviour, defaults to *IPV6*. Returns 4 values: * an address * a list of additional addresses(if existent) * the canonical name of the host * an alist of all the host's names with their respective addresses

LOOKUP-INTERFACE (INTERFACE)

Lookup an interface by name or index. UNKNOWN-INTERFACE is signalled if an interface is not found.

LOOKUP-PROTOCOL (PROTOCOL)

Lookup a protocol by name or number. Signals an UNKNOWN-PROTOCOL error if no protocol is found.

LOOKUP-SERVICE (SERVICE &OPTIONAL (PROTOCOL TCP))

Lookup a service by port or name. PROTOCOL should be one of :TCP, :UDP or :ANY.

MAKE-ADDRESS (NAME)

Constructs an ADDRESS object. NAME should be of type IPV4-ARRAY, IPV6-ARRAY or STRING in which case an instance of IPV4-ADDRESS, IPV6-ADDRESS or LOCAL-ADDRESS, respectively, will be created. Otherwise, a TYPE-ERROR is signalled. See also ENSURE-ADDRESS.

MAKE-INTERFACE (NAME INDEX)

Constructor for INTERFACE objects.

MAKE-NETMASK (&KEY CIDR CLASS)

Create a subnet mask by specifying either its class(:A, :B or :C) or a CIDR suffix(a number between 0 and 32).

MAP-IPV4-ADDRESS-TO-IPV6 (ADDRESS)

Returns an IPv6 address by mapping ADDRESS onto it.

MAP-IPV6-ADDRESS-TO-IPV4 (ADDRESS)

Extracts the IPv4 part of an IPv6-mapped IPv4 address. Signals an error if ADDRESS is not an IPv6-mapped IPv4 address.

SOCKET-IPV6-P (SOCKET)

Return T if SOCKET is an AF_INET6 socket.

STRING-ADDRESS-TO-VECTOR (ADDRESS)

Convert a string address (dotted or colon-separated) to a vector address. If the string is not a valid address, return NIL.

VECTOR-TO-COLON-SEPARATED (VECTOR &OPTIONAL (CASE DOWNCASE))

Convert an (SIMPLE-ARRAY (UNSIGNED-BYTE 16) 8) to a colon-separated IPv6 address. CASE may be :DOWNCASE or :UPCASE.

VECTOR-TO-DOTTED (VECTOR)

Convert an 4-element vector to a dotted string.

VECTOR-TO-INTEGER (VECTOR)

Convert a vector to a 32-bit unsigned integer.

WAIT-UNTIL-FD-READY (FILE-DESCRIPTOR EVENT-TYPE &OPTIONAL TIMEOUT ERRORP)

Poll file descriptor `FILE-DESCRIPTOR' for I/O readiness. `EVENT-TYPE' must be either :INPUT, :OUTPUT or :IO. `TIMEOUT' must be either a non-negative integer measured in seconds, or `NIL' meaning no timeout at all. If `ERRORP' is not NIL and a timeout occurs, then a condition of type `POLL-TIMEOUT' is signaled. Returns two boolean values indicating readability and writeability of `FILE-DESCRIPTOR'.

Undocumented

FD-READABLEP (FD)

FD-WRITABLEP (FD)

IPV6-SOCKET-P (&REST ARGS)

LOOKUP-HOST (&REST ARGS)

READ-SEQUENCE* (STREAM SEQUENCE &KEY (START 0) END)

WRITE-SEQUENCE* (STREAM SEQUENCE &KEY (START 0) END)

MACRO

Public

WITH-ACCEPT-CONNECTION ((VAR PASSIVE-SOCKET &REST ARGS) &BODY BODY)

Bind VAR to a socket created by passing PASSIVE-SOCKET and ARGS to ACCEPT-CONNECTION and execute BODY as implicit PROGN. The socket is automatically closed upon exit.

WITH-EVENT-BASE ((VAR &REST INITARGS) &BODY BODY)

Binds VAR to a new EVENT-BASE, instantiated with INITARGS, within the extent of BODY. Closes VAR.

WITH-OPEN-SOCKET ((VAR &REST ARGS) &BODY BODY)

Bind VAR to a socket created by passing ARGS to MAKE-SOCKET and execute BODY as implicit PROGN. The socket is automatically closed upon exit.

GENERIC-FUNCTION

Public

ACCEPT-CONNECTION (PASSIVE-SOCKET &KEY (WAIT T) OUTPUT-BUFFER-SIZE INPUT-BUFFER-SIZE EXTERNAL-FORMAT &ALLOW-OTHER-KEYS)

Extracts the first connection from the queue of pending connections on SOCKET. WAIT specifies how long to wait for a connection: NIL means "return immediately", a non-negative real specifies a timeout in seconds and T means "wait forever". EXTERNAL-FORMAT optionally specifies the external format of the new socket - the default being that of SOCKET. Buffer sizes for the new socket can also be specified using INPUT-BUFFER-SIZE and OUTPUT-BUFFER-SIZE. If a connection is received, returns two values: the newly created socket and the remote host address.

ADDRESS-TO-STRING (ADDRESS)

Returns a textual presentation of ADDRESS.

ADDRESS-TYPE (ADDRESS)

Returns a keyword symbol denoting the kind of ADDRESS (:IPV4, :IPV6 or :LOCAL). If ADDRESS is not a known address object, NIL is returned.

ADDRESS= (ADDR1 ADDR2)

Returns T if both arguments are the same socket address.

BIND-ADDRESS (SOCKET ADDRESS &KEY (REUSE-ADDRESS T) (PORT 0) &ALLOW-OTHER-KEYS)

Sets the local address of SOCKET to ADDRESS(and PORT for INTERNET sockets). REUSE-ADDRESS sets the SO_REUSEADDR socket option on SOCKET.

CONNECT (SOCKET ADDRESS &KEY (WAIT T) (PORT 0) &ALLOW-OTHER-KEYS)

Connects SOCKET to ADDRESS. For INTERNET sockets you can specify the port to connect to using keyword argument PORT. The default value of PORT is 0, which usually means letting the OS choose a random port to connect to. WAIT specifies how long to wait for a connection: NIL means "return immediately", a non-negative real specifies a timeout in seconds and T means "wait forever".

COPY-ADDRESS (ADDRESS)

Returns a copy of ADDRESS which is ADDRESS= to the original.

DISCONNECT (SOCKET)

Disassociates SOCKET from any remote address. Works only on DATAGRAM sockets.

DRAIN-INPUT-BUFFER (STREAM SEQUENCE &KEY START END (START 0))

SETFEXTERNAL-FORMAT-OF (EXTERNAL-FORMAT STREAM)

placeholder

INET-ADDRESS-HOST-PORTION (ADDRESS NETMASK)

Apply network netmask NETMASK to ADDRESS in order to calculate the host part of ADDRESS.

INET-ADDRESS-IN-NETWORK-P (ADDRESS NETWORK)

Return T if ADDRESS is part of the subnet specified by NETWORK.

INET-ADDRESS-LOOPBACK-P (ADDRESS)

Returns T if ADDRESS is a loopback internet address.

INET-ADDRESS-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an multicast internet address.

INET-ADDRESS-NETWORK-CLASS (ADDRESS)

Return the network class of ADDRESS: one of :A, :B, :C, :D or :E .

INET-ADDRESS-NETWORK-PORTION (ADDRESS NETMASK)

Apply network netmask NETMASK to ADDRESS in order to calculate the network part of ADDRESS.

INET-ADDRESS-PRIVATE-P (ADDRESS)

Returns T if ADDRESS is in a private network range. Private IPv4 networks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. See http://en.wikipedia.org/wiki/Private_network for details.

INET-ADDRESS-TYPE (ADDRESS)

Returns the address type of ADDRESS as 2 values: * protocol, one of :IPV4 or :IPV6 * kind, one of :UNSPECIFIED, :LOOPBACK, :MULTICAST or :UNICAST For unicast or multicast IPv6 addresses, a third value is returned which corresponds to the return value of IPV6-UNICAST-TYPE or IPV6-MULTICAST-TYPE, respectively.

INET-ADDRESS-UNICAST-P (ADDRESS)

Returns T if ADDRESS is an unicast internet address.

INET-ADDRESS-UNSPECIFIED-P (ADDR)

Returns T if ADDR is an "unspecified" internet address.

INET-ADDRESSES-IN-SAME-NETWORK-P (ADDRESS1 ADDRESS2 NETWORK)

Return T if ADDRESS1 and ADDRESS2 are both part part of the subnet specified by NETWORK.

IPV4-NETWORK= (NET1 NET2)

Returns T if the addresses and the netmasks of the two arguments are respectively ADDRESS=.

LISTEN-ON (SOCKET &KEY BACKLOG &ALLOW-OTHER-KEYS)

Start allowing incoming connections on SOCKET. BACKLOG specifies the maximum length of the queue of pending connections.

LOCAL-FILENAME (SOCKET)

Returns the local filename of SOCKET. Works only on LOCAL sockets.

LOCAL-HOST (SOCKET)

Returns the local host of SOCKET. Works only on INTERNET sockets.

LOCAL-NAME (SOCKET)

For INTERNET sockets, returns two values: the local host and the local port. For LOCAL sockets, returns the local filename.

LOCAL-PORT (SOCKET)

Returns the local port of SOCKET - an (UNSIGNED-BYTE 16). Works only on INTERNET sockets.

MAKE-SOCKET (&KEY ADDRESS-FAMILY TYPE CONNECT IPV6 EXTERNAL-FORMAT (ADDRESS-FAMILY INTERNET) (TYPE STREAM) (CONNECT ACTIVE) (IPV6 *IPV6*) (EXTERNAL-FORMAT DEFAULT) &ALLOW-OTHER-KEYS)

Create an instance of a subclass of SOCKET. ADDRESS-FAMILY, TYPE, CONNECT and IPV6 are used to specify the kind of socket to create. * ADDRESS-FAMILY - :INTERNET or :LOCAL (or :FILE as synonim) * TYPE - :STREAM or :DATAGRAM * CONNECT - :ACTIVE or :PASSIVE * IPV6 - if NIL, create an IPv4 socket, otherwise an IPv6 socket. To initialize the socket, the following keyword arguments can be used depending on ADDRESS-FAMILY, TYPE and CONNECT: * :local-host - a hostname designator or NIL. If non-null the socket will be bound to this address * :local-port - a port designator or NIL. If LOCAL-HOST is non-null, bind the socket to this port. If NIL, choose a random port * :remote-host - a hostname designator or NIL. If non-null the socket will be connected to this address * :remote-port - a port designator. If REMOTE-HOST is non-null, connect the socket to this port * :local-filename - a string or NIL. If non-null the socket will be bound to this file * :remote-filename - a string or NIL. If non-null the socket will be connected to this file * :backlog - a positive integer or NIL. Specifies the length of the incomming connection queue and can't be larger than +MAX-BACKLOG-SIZE+. If NIL, default is *DEFAULT-BACKLOG-SIZE* * :reuse-address: a boolean(default T). set option SO_REUSEADDR if LOCAL-HOST is non-null * :keepalive - a boolean. set option SO_KEEPALIVE * :nodelay - a boolean. set option SO_NODELAY * :interface - a string. set option SO_BINDTODEVICE to this interface * :input-buffer-size - a positive integer. Create the stream input buffer of this size * :output-buffer-size - a positive integer. Create the stream output buffer of this size Glossary: * hostname designator: an instance of INET-ADDRESS or any object accepted by LOOKUP-HOST. IPV6 is passed to LOOKUP-HOST as is * port designator: any object accepted by LOOKUP-SERVICE :address-family :INTERNET :type :STREAM :connect :ACTIVE * Valid keyword args: :LOCAL-HOST, :LOCAL-PORT, :REMOTE-HOST, :REMOTE-PORT, :REUSE-ADDRESS, :KEEPALIVE, :NODELAY, :INPUT-BUFFER-SIZE and :OUTPUT-BUFFER-SIZE :address-family :INTERNET :type :STREAM :connect :PASSIVE * Valid keyword args: :LOCAL-HOST, :LOCAL-PORT, :BACKLOG, :REUSE-ADDRESS, :INTERFACE and :NODELAY :address-family :INTERNET :type :STREAM :connect :ACTIVE * Valid keyword args: :LOCAL-FILENAME, :REMOTE-FILENAME, :INPUT-BUFFER-SIZE and :OUTPUT-BUFFER-SIZE :address-family :INTERNET :type :STREAM :connect :PASSIVE * Valid keyword args: :LOCAL-FILENAME, :REMOTE-FILENAME, :BACKLOG and :REUSE-ADDRESS :address-family :INTERNET :type :DATAGRAM * Valid keyword args: :LOCAL-HOST, :LOCAL-PORT, :REMOTE-HOST, :REMOTE-PORT, :REUSE-ADDRESS, :INTERFACE and :BROADCAST :address-family :LOCAL :type :DATAGRAM * Valid keyword args: :LOCAL-FILENAME and :REMOTE-FILENAME

MAKE-SOCKET-FROM-FD (FD &KEY CONNECT EXTERNAL-FORMAT INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE (CONNECT ACTIVE) (EXTERNAL-FORMAT DEFAULT))

Create a socket instance of the appropriate subclass of SOCKET using FD. The connection type of the socket must be specified - :ACTIVE or :PASSIVE. The address family and type of the socket are automatically discovered using OS functions. Buffer sizes for the new socket can also be specified using INPUT-BUFFER-SIZE and OUTPUT-BUFFER-SIZE.

MAKE-SOCKET-PAIR (&KEY TYPE PROTOCOL EXTERNAL-FORMAT INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE (TYPE STREAM) (PROTOCOL DEFAULT) (EXTERNAL-FORMAT DEFAULT))

Create a pair of sockets connected to each other. The socket type must be either :STREAM or :DATAGRAM. Currently OSes can only create :LOCAL sockets this way. Buffer sizes for the new sockets can also be specified using INPUT-BUFFER-SIZE and OUTPUT-BUFFER-SIZE.

RECEIVE-FILE-DESCRIPTOR (SOCKET)

Receive a file descriptor as ancillary data through SOCKET.

RECEIVE-FROM (SOCKET &REST ARGS &KEY FLAGS END START BUFFER SIZE &ALLOW-OTHER-KEYS)

Receives data from SOCKET. If BUFFER is specified START and END are used as bounding index. In that case BUFFER must be an array and its ARRAY-ELEMENT-TYPE be either (UNSIGNED-BYTE 8) or T. If BUFFER is not specified an (UNSIGNED-BYTE 8) buffer of size SIZE will be allocated. Some flags can also be passed to recvfrom(2): * :OUT-OF-BAND for receiving out-of-band data - only for STREAM sockets * :PEEK for keeping the returned data in the kernel buffers * :WAIT-ALL for waiting until the entire buffer can be filled * :DONT-WAIT for making only the current call non-blocking The first two values returned are the buffer and the number of elements that have been copied into the buffer. For INTERNET DATAGRAM sockets, two additional values are returned: the host and port of the remote peer from which the data was received. For LOCAL DATAGRAM sockets, one additional values is returned: the filename of the remote peer from which the data was received.

REMOTE-FILENAME (SOCKET)

Returns the remote filename of SOCKET. Works only on LOCAL sockets.

REMOTE-HOST (SOCKET)

Returns the remote host of SOCKET. Works only on INTERNET sockets.

REMOTE-NAME (SOCKET)

For INTERNET sockets, returns two values: the remote host and the remote port. For REMOTE sockets, returns the remote filename.

REMOTE-PORT (SOCKET)

Returns the remote port of SOCKET - an (UNSIGNED-BYTE 16). Works only on INTERNET sockets.

RESOLVER-ERROR-DATUM (CONDITION)

Return the datum that caused the signalling of a RESOLVER-ERROR condition.

SEND-FILE-DESCRIPTOR (SOCKET FILE-DESCRIPTOR)

Send FILE-DESCRIPTOR through SOCKET. The receiving process must use RECEIVE-FILE-DESCRIPTOR to receive the file descriptor in order for it to be valid in the receiving process.

SEND-TO (SOCKET BUFFER &REST ARGS &KEY (START 0) END REMOTE-FILENAME FLAGS REMOTE-HOST (REMOTE-PORT 0) (IPV6 *IPV6*) &ALLOW-OTHER-KEYS)

Send the contents of BUFFER to SOCKET. BUFFER must be a vector that can be coerced to a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). START and END are used a bounding index on BUFFER. For disconnected datagram sockets, REMOTE-HOST and REMOTE-PORT or REMOTE-FILENAME are used as destination for the data. Some flags can also be passed to sendto(2): * :OUT-OF-BAND for receiving out-of-band data - only for stream sockets * :DONT-WAIT for making only the current call non-blocking * :DONT-ROUTE for sending only to hosts on directly connected networks, not using gateways * :CONFIRM for signalling progress on the link layer - only available on Linux and only with DATAGRAM sockets * :MORE for telling the kernel that there is more data to send - only available on Linux Returns the number of bytes sent.

SHUTDOWN (SOCKET &KEY READ WRITE)

Shut down all or part of a connection. If READ it non-NIL, further receptions are disallowed; if WRITE is non-NIL, further transmissions are disallowed. CLOSE must still be called on SOCKET in order to release OS resources.

SOCKET-CONNECTED-P (SOCKET)

Returns a boolean specifying whether or not SOCKET is connected.

SOCKET-OPEN-P (SOCKET)

Returns a boolean indicating whether or not the file descriptor of SOCKET is open.

SOCKET-OPTION (SOCKET OPTION-NAME)

Returns the value(s) of OS option OPTION-NAME on SOCKET. For a complete list of supported options see src/sockets/socket-options.lisp.

SOCKET-OS-FD (SOCKET)

Returns the OS file descriptor of SOCKET.

SOCKET-TYPE (SOCKET)

Returns the socket type of SOCKET - :STREAM or :DATAGRAM.

UNKNOWN-INTERFACE-DATUM (CONDITION)

Return the datum that caused the signalling of an UNKNOWN-INTERFACE condition.

UNKNOWN-PROTOCOL-DATUM (CONDITION)

Return the datum that caused the signalling of an UNKNOWN-PROTOCOL condition.

UNKNOWN-SERVICE-DATUM (CONDITION)

Return the datum that caused the signalling of an UNKNOWN-SERVICE condition.

Undocumented

ADD-TIMER (EVENT-BASE FUNCTION TIMEOUT &KEY ONE-SHOT)

ERROR-CODE (ERR)

ERROR-IDENTIFIER (ERR)

ERROR-MESSAGE (ERR)

EVENT-BASE-EMPTY-P (EVENT-BASE)

EVENT-DISPATCH (EVENT-BASE &KEY ONE-SHOT TIMEOUT MIN-STEP MAX-STEP)

EXIT-EVENT-LOOP (EVENT-BASE &KEY DELAY (DELAY 0))

FD-NON-BLOCKING (FD-MIXIN)

SETFFD-NON-BLOCKING (MODE FD-MIXIN)

POLL-ERROR-FD (CONDITION)

POLL-ERROR-IDENTIFIER (CONDITION)

POLL-TIMEOUT-EVENT-TYPE (CONDITION)

POLL-TIMEOUT-FD (CONDITION)

REMOVE-FD-HANDLERS (EVENT-BASE FD &KEY READ WRITE ERROR)

REMOVE-TIMER (EVENT-BASE TIMER)

SET-ERROR-HANDLER (EVENT-BASE FD FUNCTION)

SET-IO-HANDLER (EVENT-BASE FD EVENT-TYPE FUNCTION &KEY TIMEOUT ONE-SHOT)

SLOT-ACCESSOR

Public

EXTERNAL-FORMAT-OF (OBJECT)

placehold

FD-OF (OBJECT)

placeholder

SETFFD-OF (NEW-VALUE OBJECT)

placeholder

Undocumented

ABSTRACT-ADDRESS-P (OBJECT)

ADDRESS-NAME (OBJECT)

SOCKET-ADDRESS-FAMILY (OBJECT)

SETFSOCKET-ADDRESS-FAMILY (NEW-VALUE OBJECT)

SOCKET-PROTOCOL (OBJECT)

SETFSOCKET-PROTOCOL (NEW-VALUE OBJECT)

VARIABLE

Public

*AVAILABLE-MULTIPLEXERS*

An alist of (PRIORITY . MULTIPLEXER). Smaller values mean higher priority.

*DEFAULT-BACKLOG-SIZE*

Default length of the pending connections queue (soft limit).

*DEFAULT-LINGER-SECONDS*

Default linger timeout when enabling SO_LINGER option on a socket.

*DEFAULT-MULTIPLEXER*

The default multiplexer for the current OS.

*DNS-DOMAIN*

The current machine's domain.

*DNS-NAMESERVERS*

List of the DNS nameservers to use.

*DNS-SEARCH-DOMAIN*

A domain name to be appended to the name to be searched when the latter does not contain dots.

*IPV6*

Specifies the default behaviour with respect to IPv6: - nil : Only IPv4 addresses are used. - :ipv6 : Only IPv6 addresses are used. - t : If both IPv4 and IPv6 addresses are found they are returned in the best order possible (see RFC 3484). Default value is NIL.

CLASS

Public

ACTIVE-SOCKET

Mixin class for active(client) sockets.

ADDRESS

Base class for all socket address classes.

DATAGRAM-SOCKET

Mixin for sockets of type SOCK_DGRAM.

DUAL-CHANNEL-FD-MIXIN

placeholder

DUAL-CHANNEL-GRAY-STREAM

placeholder

INET-ADDRESS

Base class for IPv4 and IPv6 addresses.

INTERNET-SOCKET

Mixin for sockets of domain AF_INET or AF_INET6.

IPV4-ADDRESS

IPv4 address. Its low-level representation can be accessed as vector of type IPV4-ARRAY through the ADDRESS-NAME reader.

IPV4-NETWORK

IPv4 network: an address plus a netmask.

IPV6-ADDRESS

IPv6 address. Its low-level representation can be accessed as vector of type IPV6-ARRAY through the ADDRESS-NAME reader.

LOCAL-ADDRESS

UNIX socket address.

LOCAL-SOCKET

Mixin for sockets of domain AF_LOCAL.

MULTIPLEXER

Base class for I/O multiplexers.

PASSIVE-SOCKET

Mixin class for PASSIVE(server) sockets.

SOCKET

Base class for sockets.

SOCKET-DATAGRAM-INTERNET-ACTIVE

Class representing active sockets of type SOCK_DGRAM and domain AF_INET or AF_INET6.

SOCKET-DATAGRAM-LOCAL-ACTIVE

Class representing active sockets of type SOCK_DGRAM and domain AF_LOCAL.

SOCKET-STREAM-INTERNET-ACTIVE

Class representing active sockets of type SOCK_STREAM and domain AF_INET or AF_INET6.

SOCKET-STREAM-INTERNET-PASSIVE

Class representing passive sockets of type SOCK_STREAM and domain AF_INET or AF_INET6.

SOCKET-STREAM-LOCAL-ACTIVE

Class representing active sockets of type SOCK_STREAM and domain AF_LOCAL.

SOCKET-STREAM-LOCAL-PASSIVE

Class representing passive sockets of type SOCK_STREAM and domain AF_LOCAL.

STREAM-SOCKET

Mixin for sockets of type SOCK_STREAM.

Undocumented

EPOLL-MULTIPLEXER

EVENT-BASE

SELECT-MULTIPLEXER

TIMER

CONDITION

Public

HANGUP

Condition signaled when the underlying device of a stream is closed by the remote end while writing to it.

NO-CHARACTERS-TO-UNREAD

Condition signaled when UNREAD-CHAR is called on a stream either: 1) without having been preceded by a READ-CHAR, or 2) after a PEEK-CHAR

POLL-ERROR

Signaled when an error occurs while polling for I/O readiness of a file descriptor.

POLL-TIMEOUT

Signaled when a timeout occurs while polling for I/O readiness of a file descriptor.

RESOLVER-AGAIN-ERROR

Condition signaled when a temporary failure occurred.

RESOLVER-ERROR

Signaled when an error occurs while trying to resolve an address.

RESOLVER-FAIL-ERROR

Condition signaled when a non-recoverable error occurred.

RESOLVER-NO-NAME-ERROR

Condition signaled when a host or service was not found.

RESOLVER-UNKNOWN-ERROR

Condition signaled when an unknown error is signaled while resolving an address.

SOCKET-ADDRESS-IN-USE-ERROR

Address already in use

SOCKET-ADDRESS-NOT-AVAILABLE-ERROR

Cannot assign requested address

SOCKET-ALREADY-CONNECTED-ERROR

Transport endpoint is already connected

SOCKET-CONNECTION-ABORTED-ERROR

Software caused connection abort

SOCKET-CONNECTION-REFUSED-ERROR

Connection refused

SOCKET-CONNECTION-RESET-ERROR

Connection reset by peer

SOCKET-CONNECTION-TIMEOUT-ERROR

Connection timed out

SOCKET-ENDPOINT-SHUTDOWN-ERROR

Cannot send after transport endpoint shutdown

SOCKET-HOST-DOWN-ERROR

Host is down

SOCKET-HOST-UNREACHABLE-ERROR

No route to host

SOCKET-NETWORK-DOWN-ERROR

Network is down

SOCKET-NETWORK-RESET-ERROR

Network dropped connection on reset

SOCKET-NETWORK-UNREACHABLE-ERROR

Network is unreachable

SOCKET-NO-BUFFER-SPACE-ERROR

No buffer space available

SOCKET-NO-NETWORK-ERROR

Machine is not on the network

SOCKET-NOT-CONNECTED-ERROR

Transport endpoint is not connected

SOCKET-OPERATION-NOT-SUPPORTED-ERROR

Operation not supported

SOCKET-OPTION-NOT-SUPPORTED-ERROR

Protocol not available

UNKNOWN-INTERFACE

Condition raised when a network interface is not found.

UNKNOWN-PROTOCOL

Condition raised when a network protocol is not found.

UNKNOWN-SERVICE

Condition raised when a network service is not found.

Undocumented

SOCKET-ERROR

CONSTANT

Public

+IPV4-LOOPBACK+

Loopback IPv4 address. (127.0.0.1)

+IPV4-UNSPECIFIED+

Unspecified IPv4 address. (0.0.0.0)

+IPV6-INTERFACE-LOCAL-ALL-NODES+

Interface local all nodes address. (ff01::1)

+IPV6-INTERFACE-LOCAL-ALL-ROUTERS+

Interface local all routers address. (ff01::2)

+IPV6-LOOPBACK+

Loopback IPv6 address. (::1)

+IPV6-SITE-LOCAL-ALL-ROUTERS+

Site local all routers address. (ff05::2)

+IPV6-UNSPECIFIED+

Unspecified IPv6 address. (::)

+MAX-IPV4-VALUE+

Integer denoting 255.255.255.255