Created
January 15, 2015 17:59
-
-
Save jcrossley3/c284e951078cd521f77e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
([handler {:keys [on-open on-close on-message on-error] :as callbacks}] | |
(fn [request] | |
(if (:websocket? request) | |
{:status 200 :body (initialize-websocket request callbacks)} | |
(if handler | |
(handler request) | |
{:status 200 :body (initialize-stream request callbacks)})))) | |
([callbacks] | |
(as-channel nil callbacks)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment