On Mon, Aug 27, 2012 at 11:56 PM, Denis Labaye <denis.lab...@gmail.com>wrote:

>
>
> On Mon, Aug 27, 2012 at 11:23 PM, larry google groups <
> lawrencecloj...@gmail.com> wrote:
>
>> I am in emacs at a clojure swank slime repl. I do this:
>>
>> user>  (def ss (Socket. "localhost", 40000))
>> #'user/ss
>>
>> user> ss
>> #<Socket Socket[addr=localhost/127.0.0.1,port=40000,localport=62125]>
>>
>>
>> All is good. All is working. I now do this, which is exactly the same
>> thing:
>>
>> (def client5 (Socket. "localhost"  42000))
>>
>> I get:
>>
>> java.lang.reflect.InvocationTargetException
>>   [Thrown class java.lang.RuntimeException]
>>
>> Backtrace:
>>   0: clojure.lang.Util.runtimeException(Util.java:165)
>>   1: clojure.lang.Compiler$NewExpr.eval(Compiler.java:2377)
>>   2: clojure.lang.Compiler$DefExpr.eval(Compiler.java:375)
>>   3: clojure.lang.Compiler.eval(Compiler.java:6470)
>>   4: clojure.lang.Compiler.eval(Compiler.java:6431)
>>   5: clojure.core$eval.invoke(core.clj:2795)
>>  --more--
>>
>>
>> What have I done wrong?
>>
>
> You've got a port open on 40000, not on 42000 ;-)
>
> telnet localhost 42000
>
>

I meant:

(def ss (Socket. "localhost", 40000))
#'user/ss

It works, you connect to the OPEN port 40000 on localhost.

(def client5 (Socket. "localhost"  42000))

You probably don't have a port 42000 open on localhost => breaks

Maybe you want to do the opposite ? Opening ports 40000 42000 from the
repl?
It's the ServerSocket class then (I think)

>  --
>> 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 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

Reply via email to