Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns scratchpad
- (:use [aleph.core :only (siphon wrap-channel)]
- [aleph.tcp :only (start-tcp-server)]
- [aleph.formats :only (channel-buffer->string)]))
- (defn echo-handler [channel connection-info]
- (siphon (wrap-channel channel #(str "Response : " (channel-buffer->string %))) channel))
- ;; Returns function to stop the server
- (def server (start-tcp-server echo-handler {:port 8080}))
Add Comment
Please, Sign In to add comment