Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to use WebSockets as event transport.
Can I use WebSockets not only for server -> client conversetions?
I have button in my UI and click listener attached to it. When i click on the button new http request will be sent. I want to use WebSocket fot this purpose instead http requests.
Hi Victor,
did you use the @Push annotation in your UI to set up Vaadin Push (using websockets)?
Did you check that both your browser and server support Web Sockets natively?
https://github.com/vaadin/vaadin/blob/master/server/src/main/java/com/vaadin/server/communication/PushConnection.java
mentions the Web Sockets are being used in a bidirectional fashion - however I have not analysed in which way this is taken advantage of.
Also, in HTTP/1.1 usually re-uses open TCP connections, so there shouldn't be any overhead anyway.
Would you elaborate more on your plans and/or share your code?
Best,
--Enver
Best,
--Enver