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 14, 2024
1 parent d625f01 commit 3986637
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/clojure/nrepl/server.clj
Expand Up @@ -158,7 +158,23 @@
(binding [dynamic-loader/*state* state]
((:handler @state) msg)))))

(defrecord Server [server-socket host port socket open-transports transport greeting handler]
(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)))

Expand Down

0 comments on commit 3986637

Please sign in to comment.