taoensso / sente

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

Electron and non-http protocol #321

Closed smogg closed 1 year ago

smogg commented 6 years ago

Is there a way to use Sente with an app running on a protocol other than http(s). I'm running an Electron app and currently the library would fail with:

Test form ([:el #{"https:" "http:"}] protocol) failed against input val "myapp:"

Is there a way around this?

ptaoussanis commented 6 years ago

@smogg Hi Oskar,

I'm not familiar with Electron or what it'd need. In principle open to changes to Sente to improve support, especially if they're small/simple. Would need you (or someone else) to propose specific change/s that'd help though.

smogg commented 6 years ago

@ptaoussanis Thanks for replying. I'm happy to dig into it when I have time. In Electron, with plugins like electron-serve, the app will be served by a custom protocol. Skimming through the code, Sente only assumes http/https, for example here: https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljc#L1385 and in a bunch of other places. Any tips on how to change that?

ptaoussanis commented 6 years ago

@smogg Haven't had an opportunity to check, but I'd suspect that a simple change to get-chsk-url or its consumer/s may do the trick.

ptaoussanis commented 1 year ago

Closing for inactivity, as part of issue triage. Please feel free to re-open if this issue is still relevant - thanks!