Skip to content

Instantly share code, notes, and snippets.

@siscia
Created February 29, 2012 18:25
Show Gist options
  • Save siscia/1943324 to your computer and use it in GitHub Desktop.
Save siscia/1943324 to your computer and use it in GitHub Desktop.
user> (use 'lamina.core 'aleph.tcp 'gloss.core)
nil
user> (defn handler [ch client-info]
(receive-all ch
#(enqueue ch (str "You said " %))))
#'user/handler
user> (start-tcp-server handler {:port 10000, :frame (string :utf-8 :delimiters ["\r\n"])})
#<netty$start_server$reify__6969 aleph.netty$start_server$reify__6969@aa85638>
user> (tcp-client {:host "localhost", :port 5635, :frame (string :utf-8 :delimiters ["\r\n"])})
<< ... >>
user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment