Thanks

On Mon, Aug 3, 2009 at 6:03 PM, Phil Hagelberg <p...@hagelb.org> wrote:

> Leotis buchanan <leotisbucha...@gmail.com> writes:
>
> > I located the process, using nstat, and then I killed it,This worked,
> > however this also killed my slime connection, which is bad, how can I
> > release the address without killing the slime connection ?
>
> You are working on an earlier "step" of the mire codebase. In later
> revisions, the last "def" is changed to a "defonce" so it won't try to
> recreate the server if it already exists. If you're doing interactive
> development you can just change that to a defonce.
>
> In earlier steps I wanted to reduce the number of new language
> constructs introduced, so I used "def" instead of "defonce".
>
> Alternatively if you actually *do* want to close the socket manually,
> you can use this:
>
>  (.close (:server-socket server))
>
> Then it will be OK for re-use.
>
> >         (ns
> mire
> >           (:use [mire
> commands])
> >           (:use [clojure.contrib server-socket
> duck-streams]))
> >
>
> >
>
> >         (def port   ( * 1
> 4445))
> >         (def prompt ">
> ")
> >
>
> >
>
> >         (defn mire-handle-client [in
> out]
> >           (binding [*in* (reader
> in)
> >                     *out* (writer
> out)]
> >             (print prompt
> (flush)
> >
>
> >             (loop [input
> (read-line)]
> >               (println (execute
> input))
> >               (print
> prompt)
> >
> (flush)
> >               (recur
> (read-line))))))
> >
>
> >
>
> >         (def server (create-server port mire-handle-client))
>
> -Phil
>
> >
>


-- 
Leotis Buchanan
Manager/Electronic Design Systems Engineer
Exterbox.com

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