Skip to content

Classes

sshirokov edited this page May 14, 2012 · 4 revisions

The wrapper for the libev event loop, maintains the work queues for associated emitters and keeps a default background work pool for blocking operations.

By default also bound to *hinge* and accessible with (get-default-hinge)

Non-abstract base for classes that emit events. Brings support for emit, add-listener and other support methods. Any class that emits events is also an emitter.

Timers are represented with little wrapping with the (mostly) familiar set-timeout and set-interval methods. The resulting timer can be cleared with clear

The server socket is the version of the socket that is responsible for accepting incoming TCP connections on a given port.

The "connection" event is emitted with a connected socket peer.

Sockets are a class for existing and outbound connections. The generally will emit "data", "close", and "timeout" events in response to operations on the wire and can send data to the remote peers.

A ZeroMQ socket wrapper. Shares an API that is an overlap of the Server and Socket classes, though the write callback is used to notify of a blocking condition since the writes of ZeroMQ are scheduled opaquely.

A background job pool accessible through the async macro. Can be instantiated in multiple instances, and schedules the evaluation of code in a pool of N threads either in the given hinge or a specified pool. The :success and :failure callbacks will be evaluated in the thread that originally requested the work to be done, which will be the same thread that controls the event machine. This allows the externalization of thread-safe computation without violating any promises an event reactor makes.

An asynchronous HTTP server. Delivers http-request and http-response objects to a callback and abstracts the operations of speaking HTTP over the wire to remote peers. Supports outgoing chunked encoding, which is enabled by default.

Offers fairly good performance and places no limits on the computations performed for request servicing (i.e. you can use async or schedule your processing with timers or other I/O callbacks).

Clone this wiki locally