Craig McDaniel <craig...@gmail.com> writes:

> On Jan 19, 11:45 am, Phil Hagelberg <p...@hagelb.org> wrote:
>> I noticed that very little of this code is specific to the REPL; the
>> bulk of it is just dealing with creating and doing things with server
>> sockets. Perhaps it could be included in clojure-contrib as a
>> generalized server-sockets library if instead of calling (repl) it could
>> take an optional argument for a different function to use?
>
> Thanks, that's a good point. I'm posting a new file server-socket.clj
> that is more generic and includes the REPL as an example case.

I just rewrote part of my app to take advantage of this new library;
it's been very useful for moving the dirty details out of my code.

I wonder if it wouldn't be a good idea to move the call to binding from
socket-repl into accept-fn. It seems like a reasonable default to rebind
*in* and *out* for the duration of the accepting function; the example
uses this as does my application.

If this is desired, I can put together a patch and create an issue for it.

-Phil

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