I think you can send :chsk/close:

https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljx#L335

This doesn't look documented either, but according to the code it'll do the trick.

Daniel Kersten <mailto:dkers...@gmail.com>
August 24, 2014 at 11:30 AM
After some more digging[1], I see that the client can call (sente/chsk-reconnect! <my-chsk>) to disconnect (and then reconnect) a connection. Looking at the comments in the code[2], it does this by closing the socket and then it gets auto-reconnected. I guess that means its not possible to disconnect without automatically reconnecting, but for now this behaviour is sufficient for me.

Hopefully this is useful to others, as I don't see chsk-reconnect! documented anywhere.

[1] https://github.com/ptaoussanis/sente/issues/63 and https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L555 [2] https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L632 and https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L732



--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com <mailto:clojure+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
Daniel Kersten <mailto:dkers...@gmail.com>
August 24, 2014 at 11:06 AM
Hi,

I'm trying programmatically close a connected sente connection (either on the server or the client).

Is this possible?

Thanks,
Dan.
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com <mailto:clojure+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com <http://www.paddleguru.com/>
Twitter <http://twitter.com/paddleguru>// Facebook <http://facebook.com/paddleguru>

--
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
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to