clojure.core.server

(source)
Socket server support

For more info about this library see:

https://clojuredocs.org/clojure.core
Public Variable Short Description
*session* (clj)
io-prepl (clj) prepl bound to *in* and *out*, suitable for use with e.g.
prepl (clj) a REPL with structured output (for programs) reads forms to eval from in-reader (a LineNumberingPushbackReader) Closing the input or passing the form :repl/quit will cause it to return Calls out-fn with data, one of: {:tag :ret :val val ;;eval result, or Throwable->map data if exception thrown :ns ns-name-string :ms long ;;eval time in milliseconds :form string ;;iff successfully read :exception true ;;iff exception thrown } {:tag :out :val string} ;chars from during-eval *out* {:tag :err :val string} ;chars from during-eval *err* {:tag :tap :val val} ;values from tap> You might get more than one :out or :err per eval, but exactly one :ret tap output can happen at any time (i.e.
remote-prepl (clj) Implements a prepl on in-reader and out-fn by forwarding to a remote [io-]prepl over a socket.
repl (clj) REPL with predefined hooks for attachable socket server.
repl-init (clj) Initialize repl in user namespace and make standard repl requires.
repl-read (clj) Enhanced :read hook for repl supporting :repl/quit.
start-server (clj) Start a socket server given the specified opts: :address Host or address, string, defaults to loopback address :port Port, integer, required :name Name, required :accept Namespaced symbol of the accept function to invoke, required :args Vector of args to pass to accept function :bind-err Bind *err* to socket out stream?, defaults to true :server-daemon Is server thread a daemon?, defaults to true :client-daemon Are client threads daemons?, defaults to true Returns server socket.
start-servers (clj) Start all servers specified in the system properties.
stop-server (clj) Stop server with name or use the server-name from *session* if none supplied.
stop-servers (clj) Stop all servers ignores all errors, and returns nil.