Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 45 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. (ns scratchpad
  2.   (:use [aleph.core :only (siphon wrap-channel)]
  3.         [aleph.tcp :only (start-tcp-server)]
  4.         [aleph.formats :only (channel-buffer->string)]))
  5.  
  6. (defn echo-handler [channel connection-info]
  7.   (siphon (wrap-channel channel #(str "Response : " (channel-buffer->string %))) channel))
  8.  
  9. ;; Returns function to stop the server
  10. (def server (start-tcp-server echo-handler {:port 8080}))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top