kuon
A small Kotlin client for phoenix channel
This is not the first one and might not be the last one, but I started using Kotlin for android development and I needed to communicate with Phoenix Channels. So I wrote a client library.
To help follow the JavaScript reference implementation, my kotlin implementation try to copy the JS as close as possible in term of code style and behavior.
At present it should be considered alpha sofware. I use it in my projects. But I thought it might be of interest for the community.
The repository is on Github GitHub - kuon/java-phoenix-channel: Phoenix Channel Java Client written in Kotlin · GitHub
Most Liked
kuon
I ported the JS code logic to kotlin, but the underlying websocket implementation has a bit different behavior compared to the browser web socket (in how lifecycle events are emited).
What I ended doing is when there is an error (not a regular error response from the server), I throw away both the channel and the socket (I call leave on channel and disconnect on socket and create new ones).
I didn’t have time to pinpoint the issue and patch my library.
As for your code, I see nothing wrong with it.
acrolink
Thanks for the great work.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








