-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add WebSockets example #592
Comments
Hi, I would like to contribute here, |
Hello, and thanks for collaborating with this project! I've just created a repository to contain the example, you can fork it, implement the example, and file the PR there, this is the URL: https://github.com/hexagonkt/websockets_chat Please note that web sockets is not the best tested part of the toolkit, if you find any problem, please tell me (or even better, file a bug 😉). Thanks again and... Happy coding! |
Facing an issue here, not sure why As per postman docs, the response code should be 101 (switching protocols) and not 202 (accepted), and i believe that's why connection is not being established. But I don't have much experience in WebSockets |
Right now I'm not at home. Let me get back to you regarding this issue after Sunday 30th :) However, please use the I'll create a different task to explicitly fail when you try to use a feature not supported by the chosen adapter, but right now it fails silently :( |
Ok, got it. i'll try with that and let you know the progress |
Great, it's working fine now. Now, to make a sample webpage for this. |
I have added the sample page as well. Complete task PR: hexagontk/websockets_chat#1 |
Thank you for your contribution! It would be great if the HTML page was served from the server (and connecting to I'll merge it right now as it is, if you want to code the proposed changes you can file another PR. Thanks! |
Hey, Great to see my PR merged! |
Sorry I though I had an example with that functionality :( Here is the example code to serve a classpath directory over a resource: https://github.com/hexagonkt/hexagon/blob/develop/http/http_test/src/main/kotlin/com/hexagonkt/http/test/examples/FilesTest.kt#L56 |
I.e.: https://javalin.io/tutorials/websocket-example
The text was updated successfully, but these errors were encountered: