I started to learn Clojure a couple of days ago. I was trying with some 
Aleph TCP echo server examples but I can not get the server to bind to a 
tcp v4 port. The server only binds to a tcp v6 port by default. 

Here my project file: 

(defproject clj-echo-server "0.1.0-SNAPSHOT"
  :description "Echo server with Aleph"
  :url "http://example.com/FIXME";
  :license {:name "Eclipse Public License"
  :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [aleph "0.3.0-beta12"]]
  :main clj-echo-server.core)

And the server code:

(ns clj-echo-server.core)
(use 'lamina.core 'aleph.tcp 'gloss.core)
(defn handler [ch client-info]
  (receive-all ch
    #(enqueue ch (str "You said " %))))
(start-tcp-server
  handler
  {:port 9000, :frame (string :utf-8 :delimiters ["\r\n"])})


I can't figure out if I'm doing something wrong or how to configure the 
binding port, the documentation wasn't very helpful about tcp ports.

My OS is an Ubuntu 12.04.2 LTS, the Leiningen version is 2.0.0-preview10 
and all runs on Java 1.6.0_24 OpenJDK 64-Bit Server VM.

Can anyone advise me on how to configure the port binding for the tcp 
server?

Thanks for your time.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to