Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created March 3, 2015 19:53
Show Gist options
  • Select an option

  • Save ztellman/804274e43754ef9e8f33 to your computer and use it in GitHub Desktop.

Select an option

Save ztellman/804274e43754ef9e8f33 to your computer and use it in GitHub Desktop.
(require '[manifold.deferred :as d])
(require '[manifold.stream :as s])
(defn tcp-handler [s conn-info]
(d/let-flow [s (wrap-stream protocol s)
msg (s/take! s)
_ (s/put! s (response msg))]
(set-up-message-handling s)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment