Skip to content

Commit

Permalink
Add comments for the fields of nrepl.server.Server
Browse files Browse the repository at this point in the history
  • Loading branch information
chancerussell committed Feb 13, 2024
1 parent d625f01 commit 5b67738
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/clojure/nrepl/server.clj
Expand Up @@ -158,9 +158,25 @@
(binding [dynamic-loader/*state* state]
((:handler @state) msg)))))

(defrecord Server [server-socket host port socket open-transports transport greeting handler]
java.io.Closeable
(close [this] (stop-server this)))
(defrecord
Server
;;A record representing an nREPL server.
[server-socket ;; A java.net.ServerSocket for underlying server connection
host ;; When starting an IP server, the hostname the server is bound to
port ;; When starting an IP server, the port the servfer is bound to
socket ;; When starting a filesystem socket server, the string path to the
;; socket file
open-transports ;; An IDeref containing a set of nrepl.transport/Transport
;; objects representing open connections
transport ;; A function that, given a java.net.Socket corresponding to an
;; incoming connection, will return a value satisfying the
;; nrepl.transport/Transport protocol for that Socket
greeting ;; A function called after a client connects but before the
;; handler. Called with the connection's corresponding
;; nrepl.transport/Transport object
handler] ;; The message handler function to use for connected clients
java.io.Closeable
(close [this] (stop-server this)))

(defn ^Server start-server
"Starts a socket-based nREPL server. Configuration options include:
Expand Down

0 comments on commit 5b67738

Please sign in to comment.