taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.73k stars 193 forks source link

ring-undertow-adapter server adapter added #372

Closed nikolap closed 3 years ago

nikolap commented 4 years ago

Sente server adapter for ring-undertow-adapter.

Let me know or feel free to make any changes as needed.

Thanks to @danboykis for help with the http fallback handler

awb99 commented 4 years ago

@nikolap do you know if it is possible to write an adapter for Jetty?

nikolap commented 4 years ago

I don't see why not. Jetty seems to have a websocket API you can use. There's a standalone implementation here you can use as a reference.

For the HTTP fallback you need to implement the Sente IServerChan interface. If Jetty has a stream implementation you can hook onto it easily. For example, Undertow is pretty easy to do it with, i.e. https://github.com/immutant/immutant/blob/master/web/src/immutant/web/internal/undertow.clj#L178

awb99 commented 4 years ago

@nikolap Thanks a lot!

awb99 commented 4 years ago

@nikolap Thanks a lot!

yogthos commented 4 years ago

any news on whether this can be merged?

nfedyashev commented 3 years ago

Don't want to be that annoying +1-er

but this would really awesome to see this in the master branch at some time in the future. @nikolap thanks for working on it!

ptaoussanis commented 3 years ago

Hey there! Sorry for the delayed response. I'm really limited on time recently - so try to batch my open-source work. Might have an opportunity to try do some later today; if so - will try merge this + cut a new release.

Thanks for the patience!!

ptaoussanis commented 3 years ago

Merging manually now, thanks Nik!

Ramblurr commented 3 years ago

Is this supported in [com.taoensso/sente "1.16.0-alpha1"]? I don't see it mentioned in the docs, but the recent jetty adapter is documented. Just an oversight or not ready yet?

ptaoussanis commented 3 years ago

Not ready yet, sorry. Still planning to merge a few more PRs, then cut a new release. Hoping to do w/in the next couple weeks.