This project uses Break Versioning as of Aug 16, 2014.
[com.taoensso/sente "1.14.0"]
As v1.14.0-RC2
, but also includes:
[com.taoensso/sente "1.14.0-RC2"]
This is a CRITICAL bugfix release, please upgrade ASAP
My sincere apologies for this mistake. Please write if I can provide more details or any other assistance. Further testing/auditing/input very much welcome! - @ptaoussanis
ring-anti-forgery
).make-channel-socket-client!
now takes an extra mandatory argmentIt now takes an explicit csrf-token
that you must provide. The value for the token can be manually extracted from the page HTML (example).
In most cases the change will involve three steps:
make-channel-socket-client!
: example.:chsk/handshake
event has changedIt now always has nil
where it once provided the csrf-token provided by the server.
I.e. before: [:chsk/handshake [<?uid> <csrf-token> <?handshake-data> <first-handshake?>]]
after: [:chsk/handshake [<?uid> nil <?handshake-data> <first-handshake?>]]
Most users won't be affected by this change.
[com.taoensso/sente "1.13.1"]
This is a hotfix release, should be non-breaking
[com.taoensso/sente "1.13.0"]
This is a maintenance release, should be non-breaking in most cases
[com.taoensso/sente "1.12.1"]
This is a non-breaking maintenance release
ring-anti-forgery
(@timothypratley)[com.taoensso/sente "1.12.0"]
This is a non-breaking bugfix release which updates some dependencies
[com.taoensso/sente "1.11.0"]
This is a non-breaking feature release
[com.taoensso/sente "1.10.0"]
This is a minor, non-breaking release focused on moving from .cljx -> .cljc
SENTE_ELIDE_JS_REQUIRE
environment var for use with React Native[com.taoensso/sente "1.9.0"]
This is a particularly substantial release focused on design refactoring, and a number of new features.
[:chsk/state <new-state-map>]
-> [:chsk/state [<old-state-map> <new-state-map>]]
:ws-kalive-ms
, :lp-timeout-ms
opts moved from client-side to server-side make-channel-socket!
fn:chsk/state
events may now contain :last-ws-error
, :last-ws-close
keys [#214]chsk-disconnect!
[#221 @theasp][com.taoensso/sente "1.8.1"]
event?
aliasThis is a major non-breaking feature release, enjoy! :-)
chsk-reconnect!
calls now always attempt reconnection immediately [#167]ajax-lite
alias (Sente Ajax req util)[com.taoensso/sente "1.8.0"]
As v1.7.0-RC1 with some updated dependencies, improved reference example
[com.taoensso/sente "1.7.0"]
This is a significant non-breaking feature release. Includes an important fix for Immutant users.
nginx-clojure
server adapter [#160 @xfeep]:error-handler
option to standard chsk routersmake-channel-socket!
now accepts an optional :params map [#158 #135 @danielcompton]:client-id
with Ajax long-polling requests [#155 @akhudek]cb-error?
convenience fn = (complement cb-success?)
[com.taoensso/sente "1.7.0-RC1"]
This is a significant maintenance+feature release which MAY BE BREAKING due to a mandatory dependency bump to Timbre v4 (see note 1 for details).
chsk-url-fn
, make cross-domain chsks easier to configure [#50 #136][com.taoensso/sente "1.6.0"]
[1] Please see https://github.com/ptaoussanis/timbre/releases/tag/v4.0.0 for Timbre v4's migration checklist. Sorry for the hassle! This one-off change allows Sente to inherit all of Timbre's logging goodness (full logging config, ns filtering, production logging call elision, etc.). Migration usu. consists of a 1 or 2 line change if you're not using custom Timbre appenders.
This is a non-breaking maintenance release
:with-credentials?
opt [#130 @bplatz][com.taoensso/sente "1.5.0"]
Trivial, non-breaking release that adds a pair of optional web-adapter aliases to help make examples a little simpler.
[com.taoensso/sente "1.4.1"]
This is a major BREAKING release. Biggest change is added support for web servers besides http-kit (only Immutant for now). A big thanks to @tobias for his assistance with the Immutant support.
nil
user-id broadcasts (previously deprecated in v1.3.0) [#85] [1][com.taoensso/sente "1.4.0"]
[1]: Server-side (chsk-send! <user-id> <event>)
calls used to broadcast to all nil-uid users when <user-id>
was nil
. Now you must use the special :sente/all-users-without-uid
keyword for these cases. The new behaviour helps prevent unintentional broadcasting.
[2]: :chsk/state
event data now contains :requested-reconnect?
val.
[3]: Server-side make-channel-socket!
fn now takes an optional :handshake-data-fn (fn [ring-req])
opt and client-side's ch-recv
now receives [:chsk/handshake [<?uid> <?csrf-token> <?handshake-data>]]
events.
[http-kit "2.1.19"]
to your project.clj :dependencies
.make-channel-socket!
call must now take a web server adapter as first argument. To continue using http-kit, add [taoensso.sente.server-adapters.http-kit]
to your Clojure-side ns form's :require
entries and pass taoensso.sente.server-adapters.http-kit/http-kit-adapter
as the first arg to make-channel-socket!
.So:
[http-kit "2.1.19"] ; <--- Add to project.clj :dependencies
(ns my-clj-ns
(:require
;; Other stuff
[taoensso.sente.server-adapters.http-kit] ; <--- Add this entry
))
;; (sente/make-channel-socket! <opts-map>) ; Old Clojure-side chsk constructor
(sente/make-channel-socket!
taoensso.sente.server-adapters.http-kit/http-kit-adapter ; <--- Add this arg
<opts-map) ; NEW Clojure-side chsk constructor
This change is a once-off nuisance that'll allow us the freedom of supporting a wide range of web servers in the future. Interested in a web server besides http-kit or Immutant? Am now welcoming PRs to support additional web servers.
Finally, please see the updated reference example project for instructions on switching to an alternative web server like Immutant.
/ Peter Taoussanis
This is a non-breaking maintenance release focused on general housekeeping + on adding some user-id flexibility.
:sente/all-users-without-uid
instead of nil
uid when intending to broadcast to users without a user id. The new behaviour is less accident prone.:provided
to keep it from being unnecessarily pulled into JARs, etc (@zentrope).:user-id-fn
's Ring request now includes a :client-id
arg provided by clients.This is a maintenance release that is non-breaking UNLESS:
- You are not using the default server-side chsk router.
- You are relying on (
?reply-fn <args>)
to log a warning rather than throw an NPE for nil?reply-fn
s.
?reply-fn
for non-callback events.ajax-call
utility.event-msg
s: :id
(event-id), :?data
(event-?data).This is a MAJOR release with a bunch of improvements, most notably efficiency improvements. It is BREAKING if-and-only-if you read from the client-side :ch-recv channel directly.
chsk-destroy!
client-side API fn.:packer
option to client+server-side make-channel-socket!
fns. This can be used to plug in an arbitrary de/serialization format. The default continues to be edn (which gives the best common-case performance and doesn't require any extra dependencies). An experimental Transit-based packer is included which allows manual + smart (automatic) per-payload format selection. See the updated reference example for details. Big thanks to @ckarlsen for getting the work started on this!start-chsk-router-loop!
->start-chsk-router!
(both client + server-side). There's a new event-handler format that's consistent between the client + server, and that makes componentizing Sente considerably easier. See the updated reference example for details. Big thanks to @hugoduncan for his work & input on this!:ch-recv
channel now receives event-msg
(maps) rather than event
(vectors). (:event <event-msg>)
will return the event-msg
's event
.Hotfix focused on adjusting default options for Heroku users.
Minor, non-breaking update.
[chsk/uidport-close]
event now triggers only 5 seconds after a WebSocket channel is closed (same as Ajax channels). Helps prevent unnecessary noise during window refresh, etc.:chsk-url-fn
option to client-side make-channel-socket!
fn for full URL control.Minor, non-breaking update.
Minor, non-breaking update.
server>user
events (@smichal).[chsk/uidport-open]
, [chsk/uidport-close]
server-side events generated on a uid connecting/disconnecting (any protocol). As before, you can watch the connected-uids
atom for more detailed info.This is a major release focused on simpler out-the-box setup + easier integration with a wide range of login/auth types.
chsk-type
, chsk-open?
.[:chsk/state]
event form has changed for added flexibility.:state
atom to client-side make-channel-socket!
fn result. Among other things, this atom contains any user-id provided by the server.nil
user-id to the server-side chsk-send!
fn (previously nil
uids would throw an assertion error). In particular, this means it's now possible to broadcast to users that aren't logged in.make-channel-socket!
fn has picked up a :csrf-token-fn
option which defaults to compatibility with the Ring-Anti-Forgery middleware.chsk-reconnect!
API method that can be called to easily re-establish a channel socket connection after a login or auth change. An example login procedure has been added to the reference example project.:ajax
or :auto
connection mode.As always, feedback welcome on any changes here. Have fun, cheers! - Peter
start-chsk-router-loop!
fns now return a (fn stop! [])
.[:chsk/close]
typo for Ajax connections (@sritchie).[:chsk/uidport-open _]
, [:chsk/uidport-close _]
.connected-uids
data.[:chsk/close]
event can now be sent to clients to disconnect them (this feature was previously experimental + undocumented).connected-uids
was incorrectly marking multi-client users as disconnected when any one of their clients disconnected.make-channel-socket!
fn signature has changed:;; OLD (note two opts maps):
(make-channel-socket! {:csrf-token "foo" :has-uid? true} {:type :auto}) ; Old
;; NEW (note single opts map):
(make-channel-socket! {:csrf-token "foo" :has-uid? true :type :auto}) ; New
make-channel-socket!
constructor now supports an optional :user-id-fn
(fn [ring-req]) -> user-id
setting (@sritchie).make-channel-socket!
now returns a :connected-uids
atom.This is a non-breaking release focused on efficiency+reliability improvements for very high stress environments.
make-channel-socket!
has picked up some knobs for this, but the defaults are sensible.Can you improve this documentation? These fine people already did:
Peter Taoussanis & Matthias NehlsenEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close