Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created October 1, 2010 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztellman/607061 to your computer and use it in GitHub Desktop.
Save ztellman/607061 to your computer and use it in GitHub Desktop.
(use 'aleph.tcp 'aleph.core)
(defn handler [ch connection-info]
(run-pipeline []
(read-merge #(read-channel ch) #(if-not %2 %1 (conj %1 %2))
#(if (closed? ch)
(forward-bytes %)
(restart %))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment