This is the usocket Reference Manual, version 0.8.8, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:00:50 2024 GMT+0.
usocket/usocket.asd
usocket/package.lisp
usocket/vendor/kqueue.lisp
usocket/vendor/OpenTransportUDP.lisp
usocket/usocket.lisp
usocket/condition.lisp
usocket/backend/iolib.lisp
usocket/backend/abcl.lisp
usocket/backend/allegro.lisp
usocket/backend/clisp.lisp
usocket/backend/openmcl.lisp
usocket/backend/clozure.lisp
usocket/backend/cmucl.lisp
usocket/backend/sbcl.lisp
usocket/backend/ecl.lisp
usocket/backend/clasp.lisp
usocket/backend/lispworks.lisp
usocket/backend/mcl.lisp
usocket/backend/mocl.lisp
usocket/backend/scl.lisp
usocket/backend/genera.lisp
usocket/backend/mezzano.lisp
usocket/option.lisp
The main system appears first, followed by any subsystem dependency.
usocket
Universal socket library for Common Lisp
Chun Tian (binghe) & Hans Huebner
Erik Enge & Erik Huelsmann
MIT
0.8.8
split-sequence
(system).
sb-bsd-sockets
(system)., for feature (:and (:or :sbcl :ecl :clasp) (:not :usocket-iolib))
iolib
(system)., for feature :usocket-iolib
package.lisp
(file).
vendor
(module).
usocket.lisp
(file).
condition.lisp
(file).
backend
(module).
option.lisp
(file).
Modules are listed depth-first from the system components tree.
usocket/vendor
:mcl
package.lisp
(file).
usocket
(system).
kqueue.lisp
(file).
opentransportudp.lisp
(file).
usocket/backend
condition.lisp
(file).
usocket
(system).
iolib.lisp
(file).
abcl.lisp
(file).
allegro.lisp
(file).
clisp.lisp
(file).
openmcl.lisp
(file).
clozure.lisp
(file).
cmucl.lisp
(file).
sbcl.lisp
(file).
ecl.lisp
(file).
clasp.lisp
(file).
lispworks.lisp
(file).
mcl.lisp
(file).
mocl.lisp
(file).
scl.lisp
(file).
genera.lisp
(file).
mezzano.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
usocket/usocket.asd
usocket/package.lisp
usocket/vendor/kqueue.lisp
usocket/vendor/OpenTransportUDP.lisp
usocket/usocket.lisp
usocket/condition.lisp
usocket/backend/iolib.lisp
usocket/backend/abcl.lisp
usocket/backend/allegro.lisp
usocket/backend/clisp.lisp
usocket/backend/openmcl.lisp
usocket/backend/clozure.lisp
usocket/backend/cmucl.lisp
usocket/backend/sbcl.lisp
usocket/backend/ecl.lisp
usocket/backend/clasp.lisp
usocket/backend/lispworks.lisp
usocket/backend/mcl.lisp
usocket/backend/mocl.lisp
usocket/backend/scl.lisp
usocket/backend/genera.lisp
usocket/backend/mezzano.lisp
usocket/option.lisp
usocket/usocket.lisp
vendor
(module).
usocket
(system).
*auto-port*
(special variable).
*ipv6-only-p*
(special variable).
*version*
(symbol macro).
*wildcard-host*
(special variable).
+max-datagram-packet-size+
(constant).
add-waiter
(function).
datagram-usocket
(class).
datagram-usocket-p
(function).
dotted-quad-to-vector-quad
(function).
get-host-by-name
(function).
get-local-address
(generic function).
get-local-name
(generic function).
get-local-port
(generic function).
get-peer-address
(generic function).
get-peer-name
(generic function).
get-peer-port
(generic function).
get-random-host-by-name
(function).
hbo-to-dotted-quad
(function).
hbo-to-vector-quad
(function).
host-byte-order
(generic function).
host-to-hostname
(function).
integer-to-octet-buffer
(function).
ip-from-octet-buffer
(function).
ip-to-octet-buffer
(function).
ip/=
(function).
ip=
(function).
ipv6-host-to-vector
(function).
make-wait-list
(function).
octet-buffer-to-integer
(function).
port-from-octet-buffer
(function).
port-to-octet-buffer
(function).
remove-all-waiters
(function).
remove-waiter
(function).
socket
(reader method).
(setf socket)
(writer method).
socket-accept
(generic function).
socket-close
(generic function).
socket-connect
(function).
socket-listen
(function).
socket-receive
(generic function).
socket-send
(generic function).
socket-shutdown
(generic function).
socket-state
(generic function).
socket-stream
(reader method).
(setf socket-stream)
(writer method).
stream-server-usocket
(class).
stream-server-usocket-p
(function).
stream-usocket
(class).
stream-usocket-p
(function).
usocket
(class).
usocket-p
(function).
vector-quad-to-dotted-quad
(function).
vector-to-ipv6-host
(function).
wait-for-input
(function).
with-client-socket
(macro).
with-connected-socket
(macro).
with-server-socket
(macro).
with-socket-listener
(macro).
%make-wait-list
(function).
bool->int
(function).
connected-p
(reader method).
(setf connected-p)
(writer method).
copy-wait-list
(function).
element-type
(reader method).
host-to-hbo
(function).
host-to-vector-quad
(function).
int->bool
(function).
ip-address-string-p
(function).
list-of-strings-to-integers
(function).
make-datagram-socket
(function).
make-socket
(function).
make-stream-server-socket
(function).
make-stream-socket
(function).
split-ipv6-address
(function).
split-timeout
(function).
state
(reader method).
(setf state)
(writer method).
wait-list
(reader method).
(setf wait-list)
(writer method).
wait-list
(structure).
wait-list-%wait
(reader).
(setf wait-list-%wait)
(writer).
wait-list-map
(reader).
(setf wait-list-map)
(writer).
wait-list-p
(function).
wait-list-waiters
(reader).
(setf wait-list-waiters)
(writer).
with-accepted-connection
(macro).
usocket/condition.lisp
usocket.lisp
(file).
usocket
(system).
address-in-use-error
(condition).
address-not-available-error
(condition).
already-shutdown-error
(condition).
bad-file-descriptor-error
(condition).
connection-aborted-error
(condition).
connection-refused-error
(condition).
connection-reset-error
(condition).
deadline-timeout-error
(condition).
host-down-error
(condition).
host-or-ip
(reader method).
(setf host-or-ip)
(writer method).
host-unreachable-error
(condition).
insufficient-implementation
(condition).
interrupted-condition
(condition).
invalid-argument-error
(condition).
invalid-socket-error
(condition).
invalid-socket-stream-error
(condition).
network-down-error
(condition).
network-reset-error
(condition).
network-unreachable-error
(condition).
no-buffers-error
(condition).
ns-condition
(condition).
ns-error
(condition).
ns-host-not-found-error
(condition).
ns-no-recovery-error
(condition).
ns-try-again-condition
(condition).
ns-try-again-error
(condition).
ns-unknown-condition
(condition).
ns-unknown-error
(condition).
operation-not-permitted-error
(condition).
operation-not-supported-error
(condition).
out-of-memory-error
(condition).
protocol-not-supported-error
(condition).
shutdown-error
(condition).
socket-condition
(condition).
socket-error
(condition).
socket-type-not-supported-error
(condition).
timeout-error
(condition).
unimplemented
(macro).
unimplemented
(condition).
unknown-condition
(condition).
unknown-error
(condition).
unsupported
(macro).
unsupported
(condition).
with-mapped-conditions
(macro).
+unix-errno-condition-map+
(special variable).
+unix-errno-error-map+
(special variable).
+unix-ns-error-map+
(special variable).
context
(reader method).
define-usocket-condition-class
(function).
define-usocket-condition-classes
(macro).
feature
(reader method).
ignore-unsupported-warnings
(macro).
map-errno-condition
(function).
map-errno-error
(function).
minimum
(reader method).
ns-real-condition
(reader method).
(setf ns-real-condition)
(writer method).
ns-real-error
(reader method).
(setf ns-real-error)
(writer method).
usocket-errno
(reader method).
usocket-real-condition
(reader method).
(setf usocket-real-condition)
(writer method).
usocket-real-error
(reader method).
(setf usocket-real-error)
(writer method).
usocket-socket
(reader method).
usocket-socket
(reader method).
(setf usocket-socket)
(writer method).
(setf usocket-socket)
(writer method).
usocket/backend/iolib.lisp
:usocket-iolib
backend
(module).
usocket/backend/abcl.lisp
(:and :abcl (:not :usocket-iolib))
backend
(module).
usocket/backend/allegro.lisp
(:and (:or :allegro :cormanlisp) (:not :usocket-iolib))
backend
(module).
usocket/backend/clisp.lisp
(:and :clisp (:not :usocket-iolib))
backend
(module).
usocket/backend/openmcl.lisp
(:and (:or :openmcl :clozure) (:not :usocket-iolib))
backend
(module).
usocket/backend/clozure.lisp
(:and :clozure (:not :usocket-iolib))
openmcl.lisp
(file).
backend
(module).
usocket/backend/cmucl.lisp
(:and :cmu (:not :usocket-iolib))
backend
(module).
usocket/backend/sbcl.lisp
(:and (:or :sbcl :ecl :clasp) (:not :usocket-iolib))
backend
(module).
get-host-name
(function).
get-hosts-by-name
(function).
get-local-address
(method).
get-local-name
(method).
get-local-port
(method).
get-peer-address
(method).
get-peer-name
(method).
get-peer-port
(method).
socket-accept
(method).
socket-close
(method).
socket-close
(method).
socket-receive
(method).
socket-send
(method).
socket-shutdown
(method).
%add-waiter
(function).
%remove-waiter
(function).
%setup-wait-list
(function).
%socket-operation-condition-in-progress-p
(function).
%socket-operation-condition-not-connected-p
(function).
%with-timeout
(macro).
*dummy-stream*
(special variable).
*socket-connect-nonblock-wait*
(special variable).
+sbcl-condition-map+
(special variable).
+sbcl-error-map+
(special variable).
get-host-by-address
(function).
handle-condition
(function).
map-socket-error
(function).
socket-connect-internal
(function).
socket-listen-internal
(function).
wait-for-input-internal
(function).
usocket/backend/ecl.lisp
(:and :ecl (:not :usocket-iolib))
sbcl.lisp
(file).
backend
(module).
usocket/backend/clasp.lisp
(:and :clasp (:not :usocket-iolib))
sbcl.lisp
(file).
backend
(module).
usocket/backend/lispworks.lisp
(:and :lispworks (:not :usocket-iolib))
backend
(module).
usocket/backend/mcl.lisp
(:and :mcl (:not :usocket-iolib))
backend
(module).
usocket/backend/mocl.lisp
(:and :mocl (:not :usocket-iolib))
backend
(module).
usocket/backend/scl.lisp
(:and :scl (:not :usocket-iolib))
backend
(module).
usocket/backend/genera.lisp
(:and :genera (:not :usocket-iolib))
backend
(module).
usocket/backend/mezzano.lisp
(:and :mezzano)
backend
(module).
usocket/option.lisp
(:not :usocket-iolib)
backend
(module).
usocket
(system).
*backend*
(special variable).
socket-option
(generic function).
(setf socket-option)
(generic function).
Packages are listed by definition order.
usocket
common-lisp
.
split-sequence
.
*auto-port*
(special variable).
*backend*
(special variable).
*ipv6-only-p*
(special variable).
*version*
(symbol macro).
*wildcard-host*
(special variable).
+max-datagram-packet-size+
(constant).
add-waiter
(function).
address-in-use-error
(condition).
address-not-available-error
(condition).
already-shutdown-error
(condition).
bad-file-descriptor-error
(condition).
connection-aborted-error
(condition).
connection-refused-error
(condition).
connection-reset-error
(condition).
datagram-usocket
(class).
datagram-usocket-p
(function).
deadline-timeout-error
(condition).
dotted-quad-to-vector-quad
(function).
get-host-by-name
(function).
get-host-name
(function).
get-hosts-by-name
(function).
get-local-address
(generic function).
get-local-name
(generic function).
get-local-port
(generic function).
get-peer-address
(generic function).
get-peer-name
(generic function).
get-peer-port
(generic function).
get-random-host-by-name
(function).
hbo-to-dotted-quad
(function).
hbo-to-vector-quad
(function).
host-byte-order
(generic function).
host-down-error
(condition).
host-or-ip
(generic reader).
(setf host-or-ip)
(generic writer).
host-to-hostname
(function).
host-unreachable-error
(condition).
insufficient-implementation
(condition).
integer-to-octet-buffer
(function).
interrupted-condition
(condition).
invalid-argument-error
(condition).
invalid-socket-error
(condition).
invalid-socket-stream-error
(condition).
ip-from-octet-buffer
(function).
ip-to-octet-buffer
(function).
ip/=
(function).
ip=
(function).
ipv6-host-to-vector
(function).
make-wait-list
(function).
network-down-error
(condition).
network-reset-error
(condition).
network-unreachable-error
(condition).
no-buffers-error
(condition).
ns-condition
(condition).
ns-error
(condition).
ns-host-not-found-error
(condition).
ns-no-recovery-error
(condition).
ns-try-again-condition
(condition).
ns-try-again-error
(condition).
ns-unknown-condition
(condition).
ns-unknown-error
(condition).
octet-buffer-to-integer
(function).
operation-not-permitted-error
(condition).
operation-not-supported-error
(condition).
out-of-memory-error
(condition).
port-from-octet-buffer
(function).
port-to-octet-buffer
(function).
protocol-not-supported-error
(condition).
remove-all-waiters
(function).
remove-waiter
(function).
shutdown-error
(condition).
socket
(generic reader).
(setf socket)
(generic writer).
socket-accept
(generic function).
socket-close
(generic function).
socket-condition
(condition).
socket-connect
(function).
socket-error
(condition).
socket-listen
(function).
socket-option
(generic function).
(setf socket-option)
(generic function).
socket-receive
(generic function).
socket-send
(generic function).
socket-shutdown
(generic function).
socket-state
(generic function).
socket-stream
(generic reader).
(setf socket-stream)
(generic writer).
socket-type-not-supported-error
(condition).
stream-server-usocket
(class).
stream-server-usocket-p
(function).
stream-usocket
(class).
stream-usocket-p
(function).
timeout-error
(condition).
unimplemented
(macro).
unimplemented
(condition).
unknown-condition
(condition).
unknown-error
(condition).
unsupported
(macro).
unsupported
(condition).
usocket
(class).
usocket-p
(function).
vector-quad-to-dotted-quad
(function).
vector-to-ipv6-host
(function).
wait-for-input
(function).
with-client-socket
(macro).
with-connected-socket
(macro).
with-mapped-conditions
(macro).
with-server-socket
(macro).
with-socket-listener
(macro).
%add-waiter
(function).
%make-wait-list
(function).
%remove-waiter
(function).
%setup-wait-list
(function).
%socket-operation-condition-in-progress-p
(function).
%socket-operation-condition-not-connected-p
(function).
%with-timeout
(macro).
*dummy-stream*
(special variable).
*socket-connect-nonblock-wait*
(special variable).
+sbcl-condition-map+
(special variable).
+sbcl-error-map+
(special variable).
+unix-errno-condition-map+
(special variable).
+unix-errno-error-map+
(special variable).
+unix-ns-error-map+
(special variable).
bool->int
(function).
connected-p
(generic reader).
(setf connected-p)
(generic writer).
context
(generic reader).
copy-wait-list
(function).
define-usocket-condition-class
(function).
define-usocket-condition-classes
(macro).
element-type
(generic reader).
feature
(generic reader).
get-host-by-address
(function).
handle-condition
(function).
host-to-hbo
(function).
host-to-vector-quad
(function).
ignore-unsupported-warnings
(macro).
int->bool
(function).
ip-address-string-p
(function).
list-of-strings-to-integers
(function).
make-datagram-socket
(function).
make-socket
(function).
make-stream-server-socket
(function).
make-stream-socket
(function).
map-errno-condition
(function).
map-errno-error
(function).
map-socket-error
(function).
minimum
(generic reader).
ns-real-condition
(generic reader).
(setf ns-real-condition)
(generic writer).
ns-real-error
(generic reader).
(setf ns-real-error)
(generic writer).
socket-connect-internal
(function).
socket-listen-internal
(function).
split-ipv6-address
(function).
split-timeout
(function).
state
(generic reader).
(setf state)
(generic writer).
usocket-errno
(generic reader).
usocket-real-condition
(generic reader).
(setf usocket-real-condition)
(generic writer).
usocket-real-error
(generic reader).
(setf usocket-real-error)
(generic writer).
usocket-socket
(generic reader).
(setf usocket-socket)
(generic writer).
wait-for-input-internal
(function).
wait-list
(generic reader).
(setf wait-list)
(generic writer).
wait-list
(structure).
wait-list-%wait
(reader).
(setf wait-list-%wait)
(writer).
wait-list-map
(reader).
(setf wait-list-map)
(writer).
wait-list-p
(function).
wait-list-waiters
(reader).
(setf wait-list-waiters)
(writer).
with-accepted-connection
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The theoretical maximum amount of data in a UDP datagram.
The IPv4 UDP packets have a 16-bit length constraint, and IP+UDP header has 28-byte.
IP_MAXPACKET = 65535, /* netinet/ip.h */
sizeof(struct ip) = 20, /* netinet/ip.h */
sizeof(struct udphdr) = 8, /* netinet/udp.h */
65535 - 20 - 8 = 65507
(But for UDP broadcast, the maximum message size is limited by the MTU size of the underlying link)
Port number to pass when an auto-assigned port number is wanted.
The backend that usocket uses. Can be either :native or :iolib
When enabled, all USOCKET functions assume IPv6 addresses only.
Hostname to pass when all interfaces in the current system are to be bound. If this variable is passed to socket-listen, IPv6 capable systems will also listen for IPv6 connections.
Bind the socket resulting from a call to ‘socket-connect’ with
the arguments ‘socket-connect-args’ to ‘socket-var’ and if ‘stream-var’ is
non-nil, bind the associated socket stream to it.
Bind ‘socket’ to ‘var’, ensuring socket destruction on exit.
‘body’ is only evaluated when ‘var’ is bound to a non-null value.
The ‘body’ is an implied progn form.
Run ‘body’, handling implementation-specific conditions by re-raising them as usocket conditions.
When ‘socket’ or ‘host-or-ip’ are specified, their values will be passed as arguments to the corresponding usocket conditions.
Bind ‘server-socket’ to ‘var’, ensuring socket destruction on exit.
‘body’ is only evaluated when ‘var’ is bound to a non-null value.
The ‘body’ is an implied progn form.
Bind the socket resulting from a call to ‘socket-listen’ with arguments ‘socket-listen-args’ to ‘socket-var’.
Add ‘input’, a usocket instance, to ‘wait-list’.
Return t if ‘socket’ is a ‘datagram-usocket’ instance.
Convert a dotted quad ‘string’ to a byte vector.
Get the first IP address for ‘name’. Returns an IPv4 address by default, or an IPv6 address if *ipv6-only-p* is true.
Get a random IP address for ‘name’. Returns an IPv4 address by default, or an IPv6 address if *ipv6-only-p* is true.
Convert a host-byte-order 32-bit ‘integer’ to a dotted quad string
Convert a host-byte-order 32-bit integer to a byte vector
Translate a string, vector quad or 16 byte IPv6 address to a stringified hostname.
Given an integer ‘integer’, write the first ‘octets’ bytes of that integer into ‘buffer’, returning ‘buffer’.
‘start’, when specified, is the first index of ‘buffer’ the bytes will be written to.
Read an IP address from ‘buffer’ at position ‘start’, returning the IP address as an integer.
Write an integer IP address ‘ip’ into ‘buffer’ as octets, starting at index ‘start’, returning ‘buffer’
Return t if ‘ip1’ and ‘ip2’ represent different hosts, nil otherwise.
Return t if ‘ip1’ and ‘ip2’ represent the same host, regardless of type; return nil otherwise.
Convert an IPv6 host ‘string’ to a byte vector
Make a wait-list from ‘waiters’, a list of usocket instances.
Given a byte vector ‘buffer’, convert ‘octets’ bytes of its contents into an integer.
‘start’, when specified, is the first index the integer will be read from.
Read a port number from ‘buffer’ at position ‘start’, returning an integer.
Write an integer ‘port’ into ‘buffer’ as octets, starting at index ‘start’, returning ‘buffer’.
Clear all sockets in ‘wait-list’, emptying the wait list.
Remove ‘input’, a usocket instance, from ‘wait-list’.
Return t if ‘socket’ is a ‘stream-server-usocket’ instance.
Return t if ‘socket’ is a ‘stream-usocket’ instance.
Return t if ‘socket’ is a usocket instance
Convert a byte vector ‘vector’ to a dotted quad string
Convert a byte vector ‘vector’ of at least 16 bytes into the string representation of an IPv6 host
Waits for one or more streams to become ready for reading from
the socket. When ‘timeout’ (a non-negative real number) is
specified, wait ‘timeout’ seconds, or wait indefinitely when
it isn’t specified. A ‘timeout’ value of 0 (zero) means polling.
‘socket-or-sockets’ can be either a single usocket instance, a list of usocket
instances, or a wait-list instance.
Returns two values: the first value is the list of streams which
are readable (or in case of server streams acceptable). NIL may
be returned for this value either when waiting timed out or when
it was interrupted (EINTR). The second value is a real number
indicating the time remaining within the timeout period or NIL if
none.
Without the READY-ONLY arg, WAIT-FOR-INPUT will return all sockets in
the original list you passed it. This prevents a new list from being
consed up. Some users of USOCKET were reluctant to use it if it
wouldn’t behave that way, expecting it to cost significant performance
to do the associated garbage collection.
Without the READY-ONLY arg, you need to check the socket STATE slot for the values documented in usocket.lisp in the usocket class.
Returns the IP address of the socket as a byte vector.
Returns the IP address and port of the socket as values.
This function applies to both ‘stream-usocket’ and ‘server-stream-usocket’ type objects.
Returns the IP port of the socket.
This function applies to both ‘stream-usocket’ and ‘server-stream-usocket’ type objects.
Returns the IP address of the peer the socket is connected to as a byte vector.
stream-usocket
)) ¶Returns the IP address and port of the peer the socket is connected to as values.
stream-usocket
)) ¶Returns the IP port of the peer the socket to.
stream-usocket
)) ¶Convert a string such as "192.168.1.1", or a vector such~
as #(192 168 1 1) to host-byte-order such as 3232235777.
This function is for IPv4 only. For IPv6 vectors, it returns 0.
ns-condition
)) ¶ns-condition
)) ¶Accepts a connection from ‘socket’, returning a ‘stream-socket’.
The stream associated with the socket returned has ‘element-type’ when explicitly specified, or the element-type passed to ‘socket-listen’ otherwise.
stream-server-usocket
) &key element-type) ¶Close a previously opened ‘usocket’.
stream-usocket
)) ¶Get a socket’s internal options
stream-usocket
) (option (eql :tcp-keepalive)
) &key) ¶stream-usocket
) (option (eql :tcp-nodelay)
) &key) ¶stream-usocket
) (option (eql :tcp-no-delay)
) &key) ¶datagram-usocket
) (option (eql :broadcast)
) &key) ¶stream-server-usocket
) (option (eql :reuse-address)
) &key) ¶stream-usocket
) (option (eql :send-timeout)
) &key) ¶stream-usocket
) (option (eql :receive-timeout)
) &key) ¶Set a socket’s internal options
stream-usocket
) (option (eql :tcp-keepalive)
) &key) ¶stream-usocket
) (option (eql :tcp-nodelay)
) &key) ¶stream-usocket
) (option (eql :tcp-no-delay)
) &key) ¶datagram-usocket
) (option (eql :broadcast)
) &key) ¶stream-server-usocket
) (option (eql :reuse-address)
) &key) ¶stream-usocket
) (option (eql :send-timeout)
) &key) ¶stream-usocket
) (option (eql :receive-timeout)
) &key) ¶Receive a packet from ‘usocket’, writing up to ‘length’ bytes into ‘buffer’, a (simple-array (unsigned-byte 8) (*)).
Returns 4 values: return-buffer, return-length, remote-host, and remote-port
‘return-buffer’: the buffer the packet was written to
‘length’: the number of bytes in the packet
‘remote-host’: the host that sent the datagram
‘remote-port’: the port the datagram was sent from
datagram-usocket
) buffer length &key element-type) ¶Send ‘length’ bytes of ‘buffer’ through a datagram ‘usocket’, returning the number of bytes sent.
‘host’ and ‘port’, when specified, will send the datagram to a different address than the socket was created with.
datagram-usocket
) buffer size &key host port offset) ¶Shutdown communication on the socket in DIRECTION.
After a shutdown no input and/or output of the indicated DIRECTION
can be performed on the ‘usocket’.
DIRECTION should be either :INPUT or :OUTPUT or :IO
stream-usocket
) direction) ¶NIL - not ready
:READ - ready to read
:READ-WRITE - ready to read and write
:WRITE - ready to write
stream-usocket
)) ¶stream-usocket
)) ¶Stream instance associated with the socket.
The ancestor of all errors usocket may generate
because of insufficient support from the underlying implementation
with respect to the arguments given to ‘function’.
One call may signal several errors, if the caller allows processing to continue.
error
.
Parent condition for all name resolution conditions.
condition
.
:host-or-ip
Parent error for all name resolution errors.
error
.
ns-condition
.
:socket
Condition raised when there’s no other - more applicable - condition available.
(quote nil)
:real-condition
Error raised when there’s no other - more applicable - error available.
(quote nil)
:real-error
Parent condition for all socket related conditions.
condition
.
Socket that raised the condition
:socket
Parent error for all socket related errors
error
.
socket-condition
.
address-in-use-error
.
address-not-available-error
.
already-shutdown-error
.
bad-file-descriptor-error
.
connection-aborted-error
.
connection-refused-error
.
connection-reset-error
.
deadline-timeout-error
.
host-down-error
.
host-unreachable-error
.
invalid-argument-error
.
invalid-socket-error
.
invalid-socket-stream-error
.
network-down-error
.
network-reset-error
.
network-unreachable-error
.
no-buffers-error
.
operation-not-permitted-error
.
operation-not-supported-error
.
out-of-memory-error
.
protocol-not-supported-error
.
shutdown-error
.
socket-type-not-supported-error
.
timeout-error
.
unknown-error
.
Signalled if a certain feature might be implemented,
based on the features of the underlying implementation, but hasn’t
been implemented yet.
Condition raised when there’s no other - more applicable - condition available.
:real-condition
Error raised when there’s no other - more applicable - error available.
Signalled when the underlying implementation
doesn’t allow supporting the requested feature.
When you see this error, go bug your vendor/implementation developer!
UDP (inet-datagram) socket
boolean
:connected-p
Socket which listens for stream connections to be initiated from remote sockets.
Default element type for streams created by ‘socket-accept’.
(quote character)
:element-type
This slot is read-only.
Stream socket class.
’
Contrary to other sockets, these sockets may be closed either
with the ‘socket-close’ method or by closing the associated stream
(which can be retrieved with the ‘socket-stream’ accessor).
get-peer-address
.
get-peer-name
.
get-peer-port
.
socket-close
.
(setf socket-option)
.
socket-option
.
(setf socket-option)
.
(setf socket-option)
.
socket-option
.
socket-option
.
(setf socket-option)
.
socket-option
.
(setf socket-option)
.
socket-option
.
socket-shutdown
.
(setf socket-stream)
.
socket-stream
.
Stream instance associated with the socket.
common-lisp
.
:stream
The main socket class.
Sockets should be closed using the ‘socket-close’ method.
Implementation specific socket object instance.’
:socket
WAIT-LIST the object is associated with.
Per-socket return value for the ‘wait-for-input’ function.
The value stored in this slot can be any of
NIL - not ready
:READ - ready to read
:READ-WRITE - ready to read and write
:WRITE - ready to write
The last two remain unused in the current version.
Runs BODY as an implicit PROGN with timeout of SECONDS. If
timeout occurs before BODY has finished, BODY is unwound and
TIMEOUT-FORM is executed with its values returned instead.
Note that BODY is unwound asynchronously when a timeout occurs, so unless all code executed during it – including anything down the call chain – is asynch unwind safe, bad things will happen. Use with care.
Dispatch correct usocket condition.
Translate a host specification (vector quad, dotted quad or domain name) to a vector quad.
Return a true value if the given string could be an IP address.
Take a list of strings and return a new list of integers (from parse-integer) on each of the string elements.
Create a usocket socket type from implementation specific socket.
Create a usocket-server socket type from an
implementation-specific socket object.
The returned value is a subtype of ‘stream-server-usocket’.
Create a usocket socket type from implementation specific socket
and stream objects.
Sockets returned should be closed using the ‘socket-close’ method or by closing the stream associated with the socket.
Split real value timeout into seconds and microseconds. Optionally, a different fractional part can be specified.
map
.
datagram-usocket
)) ¶automatically generated reader method
datagram-usocket
)) ¶automatically generated writer method
insufficient-implementation
)) ¶stream-server-usocket
)) ¶Default element type for streams created by ‘socket-accept’.
insufficient-implementation
)) ¶unsupported
)) ¶ns-unknown-condition
)) ¶ns-unknown-condition
)) ¶ns-unknown-error
)) ¶ns-unknown-error
)) ¶usocket
)) ¶usocket
)) ¶Per-socket return value for the ‘wait-for-input’ function.
The value stored in this slot can be any of
NIL - not ready
:READ - ready to read
:READ-WRITE - ready to read and write
:WRITE - ready to write
The last two remain unused in the current version.
unknown-error
)) ¶unknown-condition
)) ¶unknown-condition
)) ¶unknown-error
)) ¶unknown-error
)) ¶ns-error
)) ¶ns-error
)) ¶socket-condition
)) ¶socket-condition
)) ¶Jump to: | %
(
A B C D E F G H I L M N O P R S U V W |
---|
Jump to: | %
(
A B C D E F G H I L M N O P R S U V W |
---|
Jump to: | %
*
+
C E F H M R S W |
---|
Jump to: | %
*
+
C E F H M R S W |
---|
Jump to: | A B C D E F G H I K L M N O P S T U V W |
---|
Jump to: | A B C D E F G H I K L M N O P S T U V W |
---|