Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom payload exchange #4

Open
micHar opened this issue May 25, 2020 · 0 comments
Open

Support custom payload exchange #4

micHar opened this issue May 25, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@micHar
Copy link
Contributor

micHar commented May 25, 2020

Right now we only expose exchanging messages via the same methods that the original okhttp WebSocketListener uses, i.e. String and ByteString. We could introduce a mechanism similar to Retrofit Converters to exchange custom strongly typed messages. We need to consider that the request types and response type might be different, too. Also this might be a good place to introduce the EnvelopeJsonAdapter.
Basically when building the RxWebSocket we would provide the Converter Factory. And then listening to a specific type of responses would try to search for an appropriate converter to deal with the payload. Same with sending requests. Not sure if it makes sense without codegen, too.

@micHar micHar added the enhancement New feature or request label May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant