Skip to content

Commit

Permalink
[new] Add interface docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Mar 7, 2023
1 parent a4cf644 commit 057a8cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/taoensso/sente/interfaces.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
;; Ref. https://github.com/ptaoussanis/sente/issues/102 for more info.

(defprotocol IServerChan ; sch
;; Wraps a web server's own async channel/comms interface to abstract away
;; implementation differences.
"Wraps a web server's own async channel/comms interface to abstract away
implementation differences."
(sch-open? [sch] "Returns true iff the channel is currently open.")
(sch-close! [sch]
"If the channel is open when called: closes the channel and returns true.
Expand All @@ -22,8 +22,8 @@
returns true. Otherwise noops and returns falsey."))

(defprotocol IServerChanAdapter ; sch-adapter
;; Wraps a web server's own ring-request->ring-response interface to
;; abstract away implementation differences.
"Wraps a web server's own ring-request->ring-response interface to
abstract away implementation differences."
(ring-req->server-ch-resp [sch-adapter ring-req callbacks-map]
"Given a Ring request (WebSocket handshake or Ajax GET/POST), returns
a Ring response map with a web-server-specific channel :body that
Expand Down

0 comments on commit 057a8cb

Please sign in to comment.