-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Unable to create a sample project following documentation #479
Comments
Hi @Polve, thank you for taking the time to report your issues with the guide. This is very much appreciated.
I guess it's an unfortunate choice of examples on my part, sorry. If you only read the code snippets, the first one showing the Gradle dependencies doesn't match the sample code that follows in the guide: the dependencies show the Ktor web socket implementation, while the sample code uses the built-in web socket implementation. If you intend to use the built-in web socket like in the samples that follow, you should not add the ktor dependency, and instead add the built-in dependency. You can find information on how to add this dependency there: But basically, use this instead: implementation("org.hildan.krossbow:krossbow-stomp-core:5.12.0")
implementation("org.hildan.krossbow:krossbow-websocket-builtin:5.12.0") However, note that the choice of web socket implementation depends on which platforms you want to support. This is why the guide points you to the table of web socket clients, so you can see which ones support which platforms and make your choice. Each web socket client adapter has a corresponding guide to explain what it uses and how to configure it (in particular what dependencies to add to Gradle).
I guess I left things out "for brevity" but it backfires in this case. The function But then you'll have a question about where this
Yes. The entire Krossbow library is based on Kotlin coroutines mechanisms,
That's fair. I have no simple sample project to point you to at the moment, unfortunately, sorry. My main use case for Krossbow is the Seven Wonders game project, which uses Krossbow for its client, but for a beginner it might be a bit overwhelming. |
Thanks for the fast and useful reply! I suppose I'll have to use the ktor backend to have full multiplatform compatibilty, and yes, having a minimal sample app that connects to a stomp server, sending some packets and subscribing to a queue would be really an awesome help :-) What about leaving the issue open so you can put the link here if one day it will be available? Thanks! |
Sounds about right if you want to use your multiplatform client in the most places, and if the extra Ktor dependencies are OK for you.
I will use this issue to track the fixes in the getting started guide, and I opened another issue (#480) to track the potential addition of a simple sample project. |
Problem description
Total kotlin and krossbow beginner here, so I probably miss some obvious step.
Anyway, I'm trying to following the getting started guide and I'm even able to understand how to use the sample code:
Among the problems I have:
What would be very useful for a complete beginner like me it's a source project implementing the getting started guide and maybe a couple sample tests ready.
Is there something like this you can point me at?
Thanks for the great project!
The text was updated successfully, but these errors were encountered: