Several new string functions were added to increase portability with ClojureScript and reduce the need for Java interop calls:
The Clojure runtime now has the ability to start a socket server at initialization based on system properties. One expected use for this is serving a socket-based REPL, but it also has many other potential uses for dynamically adding server capability to existing programs without code changes. A socket server will be started for each JVM system property like "clojure.server.<server-name>". The value for this property is an edn map representing the configuration of the socket server with the following properties:
- server-daemon - defaults to true, socket server thread doesn't block exit
- address - host or address, defaults to loopback
- port - positive integer, required
- accept - namespaced symbol of function to invoke on socket accept, required
- args - sequential collection of args to pass to accept
- bind-err - defaults to true, binds `*err*` to socket out stream
- client-daemon - defaults to true, socket client thread doesn't block exit
Additionally, there is a repl function provided that is slightly customized for use with the socket server in clojure.core.server/repl. Following is an example of starting a socket server with a repl listener. This can be added to any existing Clojure program to allow it to accept external REPL clients via a local connection to port 5555. -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"
An example client you can use to connect to this socket repl is telnet:
$ telnet 127.0.0.1 5555 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. user=> (println "hello") hello
See: * CLJ-1671 * Socket REPL design page
Clojure 1.8.0-alpha5 is now available.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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 a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/xZ2YpiKg2FU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.