The goal of nats-cljc is write-once-run-both: the same .cljc consumer code compiles and runs unchanged on the JVM, the browser, and Node. A browser can reach NATS only over WebSocket, and ClojureScript cannot block a thread. We therefore make the core API non-blocking on every platform — no blocking call leaks into the portable surface — and fix one transport per platform: JVM ⇒ TCP (via jnats), all ClojureScript ⇒ WebSocket. Any NATS server reachable from a ClojureScript platform must have its websocket listener enabled.
.cljc consumer can't block on CLJS..clj-only namespaces, built on top of the portable core, for callers who want it.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |