Liking cljdoc? Tell your friends :D

hive-vim.transport

HVCP v1 transport boundary: a loopback TCP server that Vim sessions connect to, with request/response correlation, handshake, events and a port file.

Effectful. Framing and decisions come from hive-vim.protocol.codec.

HVCP v1 transport boundary: a loopback TCP server that Vim sessions connect
to, with request/response correlation, handshake, events and a port file.

Effectful. Framing and decisions come from hive-vim.protocol.codec.
raw docstring

portclj

(port server)

The TCP port SERVER listens on.

The TCP port SERVER listens on.
sourceraw docstring

read-frameclj

(read-frame reader)

Read the next frame from READER: one JSON value per line, as Vim's channel writes them. Returns ::eof at end of stream; an unparsable line comes back as {::unparsable line}, which the codec classifies as invalid.

Read the next frame from READER: one JSON value per line, as Vim's channel
writes them. Returns ::eof at end of stream; an unparsable line comes back
as {::unparsable line}, which the codec classifies as invalid.
sourceraw docstring

request!clj

(request! server session-id op-fn timeout-ms)

Send the op built by (OP-FN id) to session SESSION-ID and wait for Vim's reply. Returns (ok raw-result) or a :vim/timeout, :vim/disconnected or :vim/no-session error.

Send the op built by (OP-FN id) to session SESSION-ID and wait for Vim's
reply. Returns (ok raw-result) or a :vim/timeout, :vim/disconnected or
:vim/no-session error.
sourceraw docstring

running?clj

(running? server)
source

select-sessionclj

(select-session server selector)

The session SELECTOR names, or the most recently active one when SELECTOR is nil or blank. Returns a Result holding the session id.

The session SELECTOR names, or the most recently active one when SELECTOR is
nil or blank. Returns a Result holding the session id.
sourceraw docstring

send!clj

(send! server session-id op)

Send a fire-and-forget op (no id) to SESSION-ID. Returns a Result.

Send a fire-and-forget op (no id) to SESSION-ID. Returns a Result.
sourceraw docstring

sessionsclj

(sessions server)

Connected sessions, most recently active first.

Connected sessions, most recently active first.
sourceraw docstring

start!clj

(start! {:keys [port port-file emit-fn hello-timeout-ms clock-fn]
         :or {port 0 hello-timeout-ms s/hello-timeout-ms}})

Listen on loopback and accept Vim sessions.

opts: :port (0 picks a free port), :port-file (written with the bound port), :emit-fn (fn [event payload]) for :vim/connected :vim/event :vim/disconnected, :hello-timeout-ms, :clock-fn.

Listen on loopback and accept Vim sessions.

opts: :port (0 picks a free port), :port-file (written with the bound port),
      :emit-fn (fn [event payload]) for :vim/connected :vim/event
      :vim/disconnected, :hello-timeout-ms, :clock-fn.
sourceraw docstring

stop!clj

(stop! server)

Stop accepting, disconnect every session and remove the port file.

Stop accepting, disconnect every session and remove the port file.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close