File: nrepl-client.el.html
Provides an Emacs Lisp client to connect to Clojure nREPL servers.
A connection is an abstract idea of the communication between Emacs (client) and nREPL server. On the Emacs side connections are represented by two running processes. The two processes are the server process and client process (the connection to the server). Each of these is represented by its own process buffer, filter and sentinel.
The nREPL communication process can be broadly represented as follows:
1) The server process is started as an Emacs subprocess (e.g. via
nrepl-start-server-process). Note that if a connection was
established directly there won't be a server process.
2) The server's process filter (nrepl-server-filter) detects the
connection port from the first plain text response from the server and
starts a communication process (socket connection) as another Emacs
subprocess. This is the nREPL client process (nrepl-client-filter).
All requests and responses handling happens through this client
connection.
3) Requests are sent by nrepl-send-request and
nrepl-send-sync-request. A request is simply a list containing a
requested operation name and the parameters required by the
operation. Each request has an associated callback that is called once
the response for the request has arrived. Besides the above functions
there are specialized request senders for each type of common
operations. Examples are nrepl-request:eval, nrepl-request:clone,
nrepl-sync-request:describe.
4) Responses from the server are decoded in nrepl-client-filter and are
physically represented by alists whose structure depends on the type of
the response. After having been decoded, the data from the response is
passed over to the callback that was registered by the original
request.
Please see the comments in dedicated sections of this file for more detailed description.
Defined variables (0)
Defined functions (0)
Defined faces (8)
nrepl-message-1-face | Face 1 of the palette cycled through when coloring nREPL messages. |
nrepl-message-2-face | Face 2 of the palette cycled through when coloring nREPL messages. |
nrepl-message-3-face | Face 3 of the palette cycled through when coloring nREPL messages. |
nrepl-message-4-face | Face 4 of the palette cycled through when coloring nREPL messages. |
nrepl-message-5-face | Face 5 of the palette cycled through when coloring nREPL messages. |
nrepl-message-6-face | Face 6 of the palette cycled through when coloring nREPL messages. |
nrepl-message-7-face | Face 7 of the palette cycled through when coloring nREPL messages. |
nrepl-message-8-face | Face 8 of the palette cycled through when coloring nREPL messages. |