Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-async Reference Manual, version 0.6.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 14:31:03 2021 GMT+0.
• Introduction | What cl-async is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Cl-async is a library for general purpose, non-blocking programming in Common Lisp. Cl-async uses libuv as the backend, which is a fast, stable, portable library for asynchronous IO (used as the backend library in Node.js).
The main goal is to provide an experience that makes general asynchronous programming in lisp natural, and to also provide a number of drivers on top of cl-async.
NOTE: cl-async uses the v1.x branch of libuv, so make sure to grab that version of it (not the v0.10.x branch).
Please see the cl-async website for full documentation, examples, etc.
Quick links:
(ql:quickload :cl-async)
Please be aware that until cl-async v0.6.x is in quicklisp, you might want to
git clone the master branch into quicklisp/local-projects/
.
There is a fairly complete suite of tests in the cl-async-test
package:
(ql:quickload :cl-async-test)
(cl-async-test:run-tests)
(cl-async-test:run-tests :ssl t)
(cl-async-test:run-tests :threading t)
As always, my code is MIT licensed. Do whatever the hell you want with it. Enjoy!
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-async system | ||
• The cl-async-util system | ||
• The cl-async-base system |
Next: The cl-async-util system, Previous: Systems, Up: Systems [Contents][Index]
Andrew Danger Lyon <orthecreedence@gmail.com>
MIT
Asynchronous operations for Common Lisp.
0.6.1
cl-async.asd (file)
src (module)
Next: The cl-async-base system, Previous: The cl-async system, Up: Systems [Contents][Index]
Andrew Danger Lyon <orthecreedence@gmail.com>
MIT
Internal utilities for cl-async.
0.6.1
cl-async.asd (file)
Previous: The cl-async-util system, Up: Systems [Contents][Index]
Andrew Danger Lyon <orthecreedence@gmail.com>
MIT
Base system for cl-async.
0.6.1
cl-async.asd (file)
src/base.lisp (file)
Modules are listed depth-first from the system components tree.
• The cl-async/src module |
cl-async (system)
src/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The cl-async/src/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-async.asd
Next: The cl-async/src/event-loop․lisp file, Previous: The cl-async․asd file, Up: Lisp files [Contents][Index]
Next: The cl-async/src/event․lisp file, Previous: The cl-async/src/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
src (module)
src/event-loop.lisp
Next: The cl-async/src/dns․lisp file, Previous: The cl-async/src/event-loop․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/event.lisp
Next: The cl-async/src/streamish․lisp file, Previous: The cl-async/src/event․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/dns.lisp
Next: The cl-async/src/async-stream․lisp file, Previous: The cl-async/src/dns․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/streamish.lisp
Next: The cl-async/src/socket․lisp file, Previous: The cl-async/src/streamish․lisp file, Up: Lisp files [Contents][Index]
streamish.lisp (file)
src (module)
src/async-stream.lisp
Next: The cl-async/src/tcp․lisp file, Previous: The cl-async/src/async-stream․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/socket.lisp
Next: The cl-async/src/filesystem․lisp file, Previous: The cl-async/src/socket․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/tcp.lisp
Next: The cl-async/src/pipe․lisp file, Previous: The cl-async/src/tcp․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/filesystem.lisp
Next: The cl-async/src/signal․lisp file, Previous: The cl-async/src/filesystem․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/pipe.lisp
Next: The cl-async/src/notify․lisp file, Previous: The cl-async/src/pipe․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/signal.lisp
Next: The cl-async/src/poll․lisp file, Previous: The cl-async/src/signal․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/notify.lisp
Next: The cl-async/src/idle․lisp file, Previous: The cl-async/src/notify․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/poll.lisp
Next: The cl-async/src/process․lisp file, Previous: The cl-async/src/poll․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/idle.lisp
Next: The cl-async/src/fsevent․lisp file, Previous: The cl-async/src/idle․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/process.lisp
Next: The cl-async-util/src/util/package․lisp file, Previous: The cl-async/src/process․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/fsevent.lisp
Next: The cl-async-util/src/util/helpers․lisp file, Previous: The cl-async/src/fsevent․lisp file, Up: Lisp files [Contents][Index]
cl-async-util (system)
src/util/package.lisp
Next: The cl-async-util/src/util/foreign․lisp file, Previous: The cl-async-util/src/util/package․lisp file, Up: Lisp files [Contents][Index]
src/util/package.lisp (file)
cl-async-util (system)
src/util/helpers.lisp
Next: The cl-async-util/src/util/error․lisp file, Previous: The cl-async-util/src/util/helpers․lisp file, Up: Lisp files [Contents][Index]
src/util/helpers.lisp (file)
cl-async-util (system)
src/util/foreign.lisp
Next: The cl-async-base/src/base․lisp file, Previous: The cl-async-util/src/util/foreign․lisp file, Up: Lisp files [Contents][Index]
src/util/foreign.lisp (file)
cl-async-util (system)
src/util/error.lisp
*evcb-err* (special variable)
Previous: The cl-async-util/src/util/error․lisp file, Up: Lisp files [Contents][Index]
cl-async-base (system)
src/base.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-async package | ||
• The cl-async-util package | ||
• The cl-async-base package |
Next: The cl-async-util package, Previous: Packages, Up: Packages [Contents][Index]
package.lisp (file)
as
Next: The cl-async-base package, Previous: The cl-async package, Up: Packages [Contents][Index]
src/util/package.lisp (file)
*evcb-err* (special variable)
Previous: The cl-async-util package, Up: Packages [Contents][Index]
src/base.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported constants | ||
• Exported special variables | ||
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported conditions | ||
• Exported classes | ||
• Exported types |
Next: Exported special variables, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
src/util/foreign.lisp (file)
src/util/foreign.lisp (file)
src/util/foreign.lisp (file)
src/util/foreign.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
signal.lisp (file)
Next: Exported macros, Previous: Exported constants, Up: Exported definitions [Contents][Index]
The amount of data we’ll pull from the evbuffers when doing reading/writing.
src/base.lisp (file)
If T, will buffer writes on the socket until the next loop. This is mainly to cut down on calls to uv_write, which is fairly slow.
src/base.lisp (file)
A hash table holding C pointer -> lisp data mappings.
src/base.lisp (file)
If true, various pieces of the cl-async internals will lock their restecpive structures before operating to ensure thread safety.
src/base.lisp (file)
THE event base object used to process all async operations.
src/base.lisp (file)
The numeric identifier assigned to each new event base.
src/base.lisp (file)
A hash table holding C pointer -> lisp function(s) mappings.
src/base.lisp (file)
A buffer that lives in both C and lisp worlds (static-vector) that lets us read from sockets.
src/base.lisp (file)
Scanner that detects if a string is an IPV4 address.
src/util/helpers.lisp (file)
Scanner that detects if a string is an IPV6 address.
src/util/helpers.lisp (file)
A buffer that lives in both C and lisp worlds (static-vector) that lets us write to sockets.
src/base.lisp (file)
src/util/error.lisp (file)
If true, provides a safe default for SLIME debugger quit restart (ABORT-CALLBACK). This restart causes the callback to be aborted without quitting the event loop. If false, the default restart is set to EXIT-EVENT-LOOP.
src/base.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Handle error conditions by directing them to the specified event callback or default event handler of the current event loop, if catching app errors is enabled for the current event loop via EVENT-BASE-CATCH-APP-ERRORS, otherwise just evaluate the BODY.
If event-cbs are called via run-event-cb, make sure the event-cb is NOT double-called with the same condition twice.
src/util/error.lisp (file)
Define a top-level function with the given and also define a C callback that calls the function directly. The idea is that CFFI callbacks aren’t directly callable/debuggable, but it’s obnoxious to have to define and callback *and* a function right next to each other.
src/util/foreign.lisp (file)
Define an alias for the specified condition.
src/util/helpers.lisp (file)
Nicer syntax for delay function.
event.lisp (file)
Makes starting an event loop a tad less annoying. I really couldn’t take typing out ‘(start-event-loop (lambda () ...) ...) every time. Example:
(with-event-loop (:catch-app-errors t)
(do-something-one-does-when-an-event-loop-is-running))
See how nice that is?
event-loop.lisp (file)
Convenience macro, makes creation and initialization of CFFI types easier. Emphasis on initialization.
src/util/foreign.lisp (file)
Nicer syntax for interval function.
event.lisp (file)
Wraps around ipv4-str-to-sockaddr. Converts a string address and port and creates a sockaddr-in object, runs the body with it bound, and frees it.
src/util/foreign.lisp (file)
If threading is enabled, locks the current event loop before processing body and releases the lock after body is finished.
src/util/helpers.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Add an event to its specified event loop (make it pending). If given a :timeout (in seconds) the event will fire after that amount of time, unless it’s removed or freed.
event.lisp (file)
Add a function to be run when the event loop exits.
event-loop.lisp (file)
Given a (horrible) addrinfo C object pointer, grab either an IP4 or IP6 address and return is as a string.
src/util/foreign.lisp (file)
Create an array, made up of arr1 followed by arr2.
src/util/helpers.lisp (file)
Attach a lisp object to a foreign pointer.
src/util/helpers.lisp (file)
Grab the output from a buffer created with (make-buffer).
src/util/helpers.lisp (file)
Convert any vector/string into a byte array. Useful for sending direct byte data into write-socket-data.
src/util/helpers.lisp (file)
Call thunk with restarts that make it possible to ignore the callback
in case of an error or safely terminate the event loop.
If SWANK is active, set SLDB’s quit restart to ABORT-CALLBACK restart if *safe-sldb-quit-restart* is true or EXIT-EVENT-LOOP otherwise.
src/util/error.lisp (file)
Throw a streamish-closed condition if given a streamish that’s closed.
streamish.lisp (file)
Clear out all callbacks for the given pointer.
src/util/helpers.lisp (file)
Clear the data attached to a CFFI pointer.
src/util/helpers.lisp (file)
Clear all bound signal handlers. Great for cleaning up when exiting an app.
signal.lisp (file)
Free a socket (uvstream) and clear out all associated data. Same as close-streamish.
socket.lisp (file)
Connect a tcp socket initialized with init-client-socket.
Creates a pointer in C land that can be used to attach data/callbacks to. Note that this must be freed via clear-pointer-data.
src/util/helpers.lisp (file)
Run a function, asynchronously, after the specified amount of seconds. An
event loop must be running for this to work.
If time is nil, callback is still called asynchronously, but is queued in the event loop with no delay.
event.lisp (file)
Grab data attached to a CFFI pointer.
src/util/helpers.lisp (file)
Disable read/write monitoring on a socket. If :read or :write are nil, they are not enabled, but rather just not disabled.
socket.lisp (file)
Asynchronously lookup a DNS address. Note that if an IP address is passed, the lookup happens synchronously. If a lookup is synchronous (and instant) this returns T, otherwise nil (lookup happening in background). Either way the resolve-cb is called with the lookup info (so always assume this is async).
Util function that splits data into the (length buffer) chunks and calls write-cb for each chunk.
src/util/helpers.lisp (file)
Return the status of the event loop. Really a debug function more than anything else.
event-loop.lisp (file)
Enable read/write monitoring on a socket. If :read or :write are nil, they are not disabled, but rather just not enabled.
socket.lisp (file)
Given a libuv error number, return the error string.
src/util/foreign.lisp (file)
Exit the event loop if running.
event-loop.lisp (file)
Check if an FD is connected.
src/util/foreign.lisp (file)
Free a cl-async event object and any resources it uses.
event.lisp (file)
Free a cl-async notifier object and any resources it uses.
notify.lisp (file)
Clears out all data attached to a foreign pointer, and frees the pointer (unless :preserve-pointer is t).
src/util/helpers.lisp (file)
Clear a signal handler and unbind it.
signal.lisp (file)
fsevent.lisp (file)
fsevent.lisp (file)
fsevent.lisp (file)
Get all callbacks for the given pointer.
src/util/helpers.lisp (file)
Calls ‘callback‘ once per event loop.
Run a function, asynchronously, every ‘time‘ seconds. This function returns a function which, when called, cancels the interval.
event.lisp (file)
Determine if the given host is an IP or a hostname.
src/util/helpers.lisp (file)
Convert a string IP address and port into a sockaddr-in struct. Must be freed by the app!
src/util/foreign.lisp (file)
Determine if the given host is an IPV4 addr or a hostname.
src/util/helpers.lisp (file)
Determine if the given host is an IPV6 addr or a hostname.
src/util/helpers.lisp (file)
Create an octet buffer, optoinally filled with the given data.
src/util/helpers.lisp (file)
Make an arbitrary event, and add it to the event loop. It *must* be triggered
by (add-event <the event> :activate t) or it will sit, idle, for 100 years.
Or you can remove/free it instead.
This is useful for triggering arbitrary events, and can even be triggered from a thread outside the libuv loop.
event.lisp (file)
Makes a notifier, an object that can trigger a callback from a thread other than the event loop thread. If single-shot is true (the default), free the notifier after it’s triggered.
notify.lisp (file)
Abstraction to make a CFFI pointer #’eql to itself. Does its best to be the most performant for the current implementation.
src/util/helpers.lisp (file)
filesystem.lisp (file)
Return true if the specified error condition should not be intercepted by cl-async error handling mechanism.
src/util/error.lisp (file)
Open a pipe connection asynchronously. Optionally send data out once connected via the :data keyword (can be a string or byte array).
Start a pipe listener on the current event loop. Returns a tcp-server class which can be closed with close-tcp-server
Poll an OS FD. If the FD is a socket, :socket t must be passed.
If PROCESS is active, send the specified signal (an integer) to it and return true.
If PROCESS is not active or an error occurs (and EVENT-CB doesn’t
signal an error), return false. If EVENT-CB is specified, use it
to handle errors, otherwise signal them via ERROR.
process.lisp (file)
Remove a pending event from the event loop.
event.lisp (file)
Stops an interval from looping.
event.lisp (file)
Perform reverse DNS lookup on IP specifier as string. Call RESOLVE-CB with resolved HOST and SERVICE as strings. The callback is called once with one host, even if multiple hosts match the query.
When used in the dynamic context of catch-app-errors, wraps the calling of an event-cb with args such that errors are caught and saved, ensuring that an event-cb isn’t called twice with the same condition. When used outside the dynamic context of catch-app-errors, just invokes event-cb with args.
src/util/error.lisp (file)
Save a set of callbacks, keyed by the given pointer.
src/util/helpers.lisp (file)
Sets an FD into non-blocking mode.
src/util/foreign.lisp (file)
Set the read/write timeouts on a socket.
socket.lisp (file)
Setup a one-time signal handler for the given signo. This also sets up a lisp signal handler, so if a signal comes through while lisp is running instead of the event loop, it will run the same callback. All signal handlers are restored on event loop exit.
signal.lisp (file)
Return whether a socket is closed or not. Same as streamish-closed-p.
socket.lisp (file)
Run the program specified by PATH with specified ARGS.
ARGS don’t include the executable path (argv[0]). Return process
object and pipes or streams for input, output and error output file
descriptors of the child process (NIL for file descriptors that
aren’t redirected via :PIPE or :STREAM, see below).
EXIT-CB specifies the callback that should be called when the
program terminates. It should be a function taking three arguments:
process object, exit status and signal number that caused program
termination (0 if the program wasn’t terminated by signal).
EVENT-CB specifies error handler to be used.
INPUT, OUTPUT and ERROR-OUTPUT specify process input/output/error
redirection. For each of these, the following values are
supported:
:IGNORE the corresponding file descriptor isn’t used
:INHERIT inherit file descriptor from this process
(:PIPE [:READ-CB ...] ...) use pipe-based redirection of the
corresponding file descriptor (see PIPE-CONNECT for the set
of supported keyword arguments).
(:STREAM [:READ-CB ...] ...) same as PIPE, but uses async
stream instead of a pipe.
ENV is an alist of (VAR . VALUE) pairs specifying the environment variables
of the spawned process. Note that both VAR and VALUE must be strings.
WORKING-DIRECTORY specifies the current working directory of the spawned program. Defaults to the current working directory of its parent process (viz. the process SPAWN is called from).
process.lisp (file)
Simple wrapper function that starts an event loop which runs the given callback, most likely to init your server/client.
event-loop.lisp (file)
Return statistics about the current event loop.
event-loop.lisp (file)
async-stream.lisp (file)
Return whether a streamish is closed or not.
streamish.lisp (file)
Open a TCP connection asynchronously. Optionally send data out once connected via the :data keyword (can be a string or byte array).
Open a TCP connection asynchronously. Optionally send data out once connected via the :data keyword (can be a string or byte array).
Fires the callback attached to a notifier. Can be called from any thread.
notify.lisp (file)
An compatibility alias for STREAMISH-WRITE.
socket.lisp (file)
Write data to a buffer created with (make-buffer).
src/util/helpers.lisp (file)
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Closes a socket server. If already closed, does nothing.
socket.lisp (file)
Free a streamish (uvstream) and clear out all associated data.
streamish.lisp (file)
tcp.lisp (file)
socket.lisp (file)
Close and free a streamish and all of it’s underlying structures.
Holds the C object pointing to the underlying event loop object.
src/base.lisp (file)
If t (or a function) will trap all errors produced in the event loop and process them internally
src/base.lisp (file)
Holds all callback data attached to this event loop.
src/base.lisp (file)
Holds the DNS base object used for DNS lookups.
src/base.lisp (file)
Tracks how many open requests are pending on the dns base.
src/base.lisp (file)
Holds functions to be run when the event loop exist (cleanly or otherwise).
src/base.lisp (file)
Holds all callbacks attached to this event loop.
src/base.lisp (file)
Holds this event loop’s numeric id.
src/base.lisp (file)
Holds *the* lock for this event base.
src/base.lisp (file)
automatically generated reader method
src/base.lisp (file)
automatically generated writer method
src/base.lisp (file)
automatically generated reader method
src/base.lisp (file)
automatically generated writer method
src/base.lisp (file)
If t, will send caught errors to the event-cb instead of handle-error
src/base.lisp (file)
Holds all signal handlers.
src/base.lisp (file)
automatically generated reader method
event.lisp (file)
automatically generated writer method
event.lisp (file)
src/base.lisp (file)
src/base.lisp (file)
automatically generated reader method
event.lisp (file)
automatically generated writer method
event.lisp (file)
automatically generated reader method
event.lisp (file)
Default error handler responsible for handling uncaught errors.
src/util/error.lisp (file)
automatically generated reader method
notify.lisp (file)
automatically generated reader method
process.lisp (file)
automatically generated writer method
process.lisp (file)
automatically generated reader method
process.lisp (file)
automatically generated writer method
process.lisp (file)
automatically generated reader method
process.lisp (file)
automatically generated writer method
process.lisp (file)
Reference a libuv handle object (uv_ref)
event-loop.lisp (file)
notify.lisp (file)
event.lisp (file)
socket.lisp (file)
socket.lisp (file)
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
Returned associated streamish for THING or THING itself if THING is a streamish.
streamish.lisp (file)
(setf streamish) (generic function)
automatically generated reader method
async-stream.lisp (file)
streamish (generic function)
automatically generated writer method
async-stream.lisp (file)
streamish.lisp (file)
automatically generated reader method
streamish.lisp (file)
automatically generated writer method
streamish.lisp (file)
Write data into a streamish. Allows specifying read/write/event
callbacks. Any callback left nil will use that current callback from the
streamish (so they only override when specified, otherwise keep the current
callback).
Note that libuv doesn’t buffer output for non-connected sockets, so we have to do it ourselves by checking if the socket is connected and buffering accordingly.
streamish.lisp (file)
socket.lisp (file)
streamish.lisp (file)
Unreference a libuv handle object (uv_unref)
event-loop.lisp (file)
notify.lisp (file)
event.lisp (file)
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Passed to a failure callback when a DNS error occurs on a connection.
dns.lisp (file)
event-error (condition)
Describes a general error event.
src/base.lisp (file)
:code
(quote 0)
event-errcode (generic function)
:msg
(quote nil)
event-errmsg (generic function)
Thrown when a freed event is operated on.
event.lisp (file)
event-error (condition)
:event
(quote nil)
event-freed-event (generic function)
(setf event-freed-event) (generic function)
Describes the base event for any action in cl-async.
src/base.lisp (file)
condition (condition)
Error: access denied
filesystem.lisp (file)
filesystem-error (condition)
Error: no such file or directory
filesystem.lisp (file)
filesystem-error (condition)
Error: permission denied
filesystem.lisp (file)
filesystem-error (condition)
Base class for filesystem conditions
filesystem.lisp (file)
event-error (condition)
Connection aborted.
socket.lisp (file)
socket-error (condition)
Passed to a server’s event-cb when there’s an error accepting a connection.
socket.lisp (file)
socket-error (condition)
:listener
(quote (cffi-sys:null-pointer))
socket-accept-error-listener (generic function)
(setf socket-accept-error-listener) (generic function)
:server
(quote nil)
socket-accept-error-server (generic function)
(setf socket-accept-error-server) (generic function)
Address is already in use.
socket.lisp (file)
socket-error (condition)
Thrown when a closed streamish is being operated on.
streamish.lisp (file)
streamish-error (condition)
Peer closes a socket connection.
socket.lisp (file)
Describes a general socket connection error.
socket.lisp (file)
Base socket condition. Holds the socket object.
socket.lisp (file)
streamish-info (condition)
socket-error (condition)
:streamish, :socket
(quote nil)
socket (generic function)
(setf socket) (generic function)
Connection refused.
socket.lisp (file)
socket-error (condition)
Connection reset.
socket.lisp (file)
socket-error (condition)
Socket connection timed out.
socket.lisp (file)
socket-error (condition)
Broken pipe.
streamish.lisp (file)
streamish-error (condition)
Operation canceled.
streamish.lisp (file)
streamish-error (condition)
Thrown when a closed streamish is being operated on.
streamish.lisp (file)
streamish-error (condition)
Passed to an event callback when stream EOF is reached.
streamish.lisp (file)
streamish-info (condition)
socket-eof (condition)
Describes a general streamish error.
streamish.lisp (file)
Base streamish condition. Holds the streamish object.
streamish.lisp (file)
event-info (condition)
:streamish, :socket
(quote nil)
Passed to a server’s event-cb when there’s an error accepting a connection.
socket.lisp (file)
socket-error (condition)
:listener
(quote (cffi-sys:null-pointer))
socket-accept-error-listener (generic function)
(setf socket-accept-error-listener) (generic function)
:server
(quote nil)
socket-accept-error-server (generic function)
(setf socket-accept-error-server) (generic function)
Peer closes a socket connection.
socket.lisp (file)
Describes a general socket connection error.
socket.lisp (file)
Base socket condition. Holds the socket object.
socket.lisp (file)
streamish-info (condition)
socket-error (condition)
:streamish, :socket
(quote nil)
socket (generic function)
(setf socket) (generic function)
Connection refused.
socket.lisp (file)
socket-error (condition)
Connection reset.
socket.lisp (file)
socket-error (condition)
Thrown when a server fails to bind (generally, the port is already in use).
tcp.lisp (file)
socket-error (condition)
:addr
(quote nil)
tcp-server-bind-error-addr (generic function)
(setf tcp-server-bind-error-addr) (generic function)
:port
(quote nil)
tcp-server-bind-error-port (generic function)
(setf tcp-server-bind-error-port) (generic function)
Socket connection timed out.
socket.lisp (file)
socket-error (condition)
Next: Exported types, Previous: Exported conditions, Up: Exported definitions [Contents][Index]
Async input stream.
async-stream.lisp (file)
async-io-stream (class)
Async stream for both input and output.
async-stream.lisp (file)
Async output stream.
async-stream.lisp (file)
async-io-stream (class)
The underlying class for async streams. Wraps a streamish.
async-stream.lisp (file)
trivial-gray-stream-mixin (class)
:socket, :streamish
streamish (generic function)
(setf streamish) (generic function)
(cl-async-util:make-buffer)
stream-buffer (generic function)
(setf stream-buffer) (generic function)
Wraps a C libuv event object.
event.lisp (file)
standard-object (class)
:c
(cffi-sys:null-pointer)
event-c (generic function)
(setf event-c) (generic function)
(setf event-freed) (generic function)
A class that holds an event loop and all of the state that it manages.
One object to rule them all, one object to find them.
One object to bring them in and in the darkness bind them.
src/base.lisp (file)
standard-object (class)
Holds the C object pointing to the underlying event loop object.
:c
event-base-c (generic function)
(setf event-base-c) (generic function)
Holds this event loop’s numeric id.
:id
event-base-id (generic function)
(setf event-base-id) (generic function)
Holds all callbacks attached to this event loop.
:function-registry
(make-hash-table :test (function eql))
event-base-function-registry (generic function)
(setf event-base-function-registry) (generic function)
Holds all callback data attached to this event loop.
:data-registry
(make-hash-table :test (function eql))
event-base-data-registry (generic function)
(setf event-base-data-registry) (generic function)
Holds functions to be run when the event loop exist (cleanly or otherwise).
:exit-functions
event-base-exit-functions (generic function)
(setf event-base-exit-functions) (generic function)
Holds all signal handlers.
:signal-handlers
event-base-signal-handlers (generic function)
(setf event-base-signal-handlers) (generic function)
Holds the DNS base object used for DNS lookups.
:dns-base
event-base-dns-base (generic function)
(setf event-base-dns-base) (generic function)
Tracks how many open requests are pending on the dns base.
:dns-ref-count
0
event-base-dns-ref-count (generic function)
(setf event-base-dns-ref-count) (generic function)
If t (or a function) will trap all errors produced in the event loop and process them internally
:catch-app-errors
event-base-catch-app-errors (generic function)
(setf event-base-catch-app-errors) (generic function)
If t, will send caught errors to the event-cb instead of handle-error
:send-errors-to-eventcb
event-base-send-errors-to-eventcb (generic function)
(setf event-base-send-errors-to-eventcb) (generic function)
Holds *the* lock for this event base.
:lock
(bordeaux-threads:make-lock)
event-base-lock (generic function)
(setf event-base-lock) (generic function)
0
event-base-num-connections-in (generic function)
(setf event-base-num-connections-in) (generic function)
0
event-base-num-connections-out (generic function)
(setf event-base-num-connections-out) (generic function)
Wraps a libuv idle handle.
idle.lisp (file)
standard-object (class)
:c
(cffi-sys:null-pointer)
idler-c (generic function)
(setf idler-c) (generic function)
(setf idler-freed) (generic function)
Wraps a threading-enabled notifier.
notify.lisp (file)
standard-object (class)
:c
(cffi-sys:null-pointer)
notifier-c (generic function)
(setf notifier-c) (generic function)
(setf notifier-freed) (generic function)
:single-shot
t
(setf notifier-single-shot) (generic function)
pipe.lisp (file)
Wraps a polling handle.
poll.lisp (file)
standard-object (class)
:c
(cffi-sys:null-pointer)
poller-c (generic function)
(setf poller-c) (generic function)
(setf poller-freed) (generic function)
Wraps around a socket.
socket.lisp (file)
streamish (class)
socket-c (generic function)
(setf socket-c) (generic function)
socket-data (generic function)
(setf socket-data) (generic function)
socket-address (generic function)
(setf socket-address) (generic function)
socket-closed (generic function)
(setf socket-closed) (generic function)
Holds data sent on the socket that hasn’t been sent yet.
:buffer
(cl-async-util:make-buffer)
socket-buffer (generic function)
(setf socket-buffer) (generic function)
Lets us know if the socket is currently buffering output.
socket-buffering-p (generic function)
(setf socket-buffering-p) (generic function)
:connected
socket-connected (generic function)
(setf socket-connected) (generic function)
socket-drain-read-buffer (generic function)
(setf socket-drain-read-buffer) (generic function)
Wraps around a streamish.
streamish.lisp (file)
standard-object (class)
socket (class)
:c
(cffi-sys:null-pointer)
streamish-c (generic function)
(setf streamish-c) (generic function)
Used to store arbitrary (app-defined) data with a streamish.
cl-async::data
streamish-data (generic function)
(setf streamish-data) (generic function)
:closed
streamish-closed (generic function)
(setf streamish-closed) (generic function)
:drain-read-buffer
t
streamish-drain-read-buffer (generic function)
(setf streamish-drain-read-buffer) (generic function)
tcp.lisp (file)
tcp.lisp (file)
:direction
:out
socket-direction (generic function)
(setf socket-direction) (generic function)
Previous: Exported classes, Up: Exported definitions [Contents][Index]
src/util/helpers.lisp (file)
src/util/helpers.lisp (file)
src/util/helpers.lisp (file)
src/util/helpers.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal classes |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
src/util/error.lisp (file)
Holds ID -> event-base lookups for every active event loop. Mainly used when grabbing the threading context for a particular event loop.
event-loop.lisp (file)
Locks the event-base registry.
event-loop.lisp (file)
Maximum number of event loop cleanup iterations
event-loop.lisp (file)
Next: Internal generic functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
fsevent.lisp (file)
Connect a pipe initialized with init-client-socket.
Called when an async notifier is triggered.
notify.lisp (file)
Called when an async handle is closed.
notify.lisp (file)
event-loop.lisp (file)
Checks that an event being operated on is not freed.
event.lisp (file)
Checks that an notifier being operated on is not freed.
notify.lisp (file)
Compatibility alias for CHECK-STREAMISH-OPEN.
socket.lisp (file)
Callback for DNS lookups.
Close an event loop by looping over its open handles, closing them, rinsing and repeating until uv-loop-close returns 0, but at most *LOOP-CLOSE-ITERS* times.
event-loop.lisp (file)
Close an UV stream.
streamish.lisp (file)
Called when an event (error, mainly) occurs.
streamish.lisp (file)
filesystem.lisp (file)
fsevent.lisp (file)
Called when a fs-monitor closes.
fsevent.lisp (file)
Called when an idle handler fires.
Called when an idler closes.
Initialize an async socket, but do not connect it.
socket.lisp (file)
Called by the socket-accept-cb when an incoming connection is detected. Sets up a socket between the client and the server along with any callbacks the server has attached to it. Returns the cl-async socket object created.
socket.lisp (file)
process.lisp (file)
Generic callback for lisp signal handling.
signal.lisp (file)
Called when we want to close the loop AND IT WONT CLOSE. So we walk each handle and close them.
event-loop.lisp (file)
Called when something happens on a polled FD.
Called when a poller closes.
process.lisp (file)
Called when a process closes.
process.lisp (file)
run and clear out all event loop exit functions.
event-loop.lisp (file)
process.lisp (file)
Callback for reverse DNS lookups.
Replace the current handler for the signal number under signo, and return a pointer to the handler that is being replaced.
signal.lisp (file)
All signals come through here.
signal.lisp (file)
Called when a signal handler closes.
signal.lisp (file)
Creates a pointer from a signal number. Not that this doesn’t need to be freed since we’re not allocating anything...just creating a pointer object with a specific address (which can be GCed).
signal.lisp (file)
Called by a listener when an incoming connection is detected. Thin wrapper around init-incoming-socket, which does all the setting up of callbacks and pointers and so forth.
socket.lisp (file)
Called when an outgoing socket connects.
socket.lisp (file)
Start a socket listener on the current event loop. Returns a socket-server instance which can be closed with close-socket-server
socket.lisp (file)
Called when we want to allocate data to be filled for stream reading.
streamish.lisp (file)
Called when a streamish closes.
streamish.lisp (file)
streamish.lisp (file)
Called when a stream has been read into a buffer returned by alloc-cb.
streamish.lisp (file)
Start reading on the socket, return true on success. Invoke streamish’ event handler callback on error, returning NIL.
streamish.lisp (file)
Called when a streamish shuts down.
streamish.lisp (file)
Called when data is finished being written to a streamish.
streamish.lisp (file)
Open a TCP connection asynchronously. Optionally send data out once connected via the :data keyword (can be a string or byte array).
Start a TCP listener on the current event loop. Returns a tcp-server class which can be closed with close-tcp-server
Callback used by the async timer system to find and run user-specified callbacks on timer events.
event.lisp (file)
Called when a timer closes.
event.lisp (file)
Called when we’re walking the loop.
event-loop.lisp (file)
Util function to write data directly to a uv stream object.
streamish.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
Make an event based on errno and streamish.
streamish.lisp (file)
filesystem.lisp (file)
filesystem.lisp (file)
filesystem.lisp (file)
socket.lisp (file)
socket.lisp (file)
socket.lisp (file)
socket.lisp (file)
socket.lisp (file)
socket.lisp (file)
event.lisp (file)
automatically generated reader method
fsevent.lisp (file)
automatically generated writer method
fsevent.lisp (file)
Perform cleanup for a libuv handle
event-loop.lisp (file)
fsevent.lisp (file)
process.lisp (file)
notify.lisp (file)
pipe.lisp (file)
tcp.lisp (file)
socket.lisp (file)
event.lisp (file)
Create an underlying stream handle for socket connection
socket.lisp (file)
pipe.lisp (file)
tcp.lisp (file)
automatically generated reader method
notify.lisp (file)
automatically generated writer method
notify.lisp (file)
automatically generated reader method
notify.lisp (file)
automatically generated writer method
notify.lisp (file)
notify.lisp (file)
automatically generated reader method
notify.lisp (file)
automatically generated writer method
notify.lisp (file)
automatically generated reader method
notify.lisp (file)
automatically generated reader method
process.lisp (file)
automatically generated writer method
process.lisp (file)
Take data we’ve buffered between initial sending and actual streamish and send it out.
async-stream.lisp (file)
Return socket class for connections accepted by SERVER
socket.lisp (file)
pipe.lisp (file)
tcp.lisp (file)
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
Holds data sent on the socket that hasn’t been sent yet.
socket.lisp (file)
Lets us know if the socket is currently buffering output.
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
Bind socket server to the specified address, return libuv errno. Specify FD to bind the server to an existing file descriptor.
socket.lisp (file)
pipe.lisp (file)
tcp.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
automatically generated reader method
socket.lisp (file)
automatically generated writer method
socket.lisp (file)
Append some data to a stream’s underlying buffer.
async-stream.lisp (file)
automatically generated reader method
async-stream.lisp (file)
automatically generated writer method
async-stream.lisp (file)
This is always a binary stream.
async-stream.lisp (file)
automatically generated reader method
streamish.lisp (file)
automatically generated writer method
streamish.lisp (file)
Used to store arbitrary (app-defined) data with a streamish.
streamish.lisp (file)
automatically generated reader method
streamish.lisp (file)
automatically generated writer method
streamish.lisp (file)
Write any pending data on the given socket to its underlying stream.
socket.lisp (file)
Next: Internal classes, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
Thrown when a freed notifier is operated on.
notify.lisp (file)
event-error (condition)
:notifier
(quote nil)
notifier-freed-notifier (generic function)
(setf notifier-freed-notifier) (generic function)
Previous: Internal conditions, Up: Internal definitions [Contents][Index]
fsevent.lisp (file)
standard-object (class)
fs-monitor-c (generic function)
(setf fs-monitor-c) (generic function)
pipe.lisp (file)
pipe.lisp (file)
standard-object (class)
make-socket-handle (method)
process.lisp (file)
standard-object (class)
:c
process-c (generic function)
(setf process-c) (generic function)
:input
process-input (generic function)
(setf process-input) (generic function)
:output
process-output (generic function)
(setf process-output) (generic function)
:error-output
process-error-output (generic function)
(setf process-error-output) (generic function)
Wraps around a connection listener.
socket.lisp (file)
standard-object (class)
:c
(cffi-sys:null-pointer)
socket-server-c (generic function)
(setf socket-server-c) (generic function)
:closed
socket-server-closed (generic function)
(setf socket-server-closed) (generic function)
:stream
socket-server-stream (generic function)
(setf socket-server-stream) (generic function)
tcp.lisp (file)
standard-object (class)
make-socket-handle (method)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L M |
---|
Jump to: | C F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A B C D E F G H I L M N P R S T U W |
---|
Jump to: | %
(
A B C D E F G H I L M N P R S T U W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
+
A B C D E F I L M N O P S |
---|
Jump to: | *
+
A B C D E F I L M N O P S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | A B C D E F I N O P S T |
---|
Jump to: | A B C D E F I N O P S T |
---|