Hello,
can anybody help me how to use the websocketserver/client (IO.WebSocket)?
The only thing I figured out, is the way to send from the client. But how to send from the server, how to receive(get the message) from server/client?
Thanks!
Best regards
Matthias Zielfeld
Hey there!
Did you have a look at the help patch available in the help browser?
It shows a simple echo setup where the client sends a string to the server, and the server replies back with the same string.
Hope this helps!
Hello,
thanks for your answer. Yes, I played around with the example, but I didn’t understand how to get the receive data from server/client, and how to send from server. I’m a beginner in vvvv gamma, I apologise.
Matthias
@matthiasz i have added some parts to the help patch to get you going. check it out
VL websocket send receive example.vl (23.3 KB)
Nice improvement. Most Websocket examples that I’ve come across in other languages show an echo example, which for as a first time introduction was confusing.
Hello tgd,
great! Thanks a lot, that works for me and I beginn to understand. One further question: How to get the number of the client wich sends a message at the recive section of the server (I tryed to get it out of the split node, but I didn´t figured out how to do)?
Matthias
the reactive for each can do only one output but you can join the message outputs and get both out like this for example. see:
VL websocket send receive example 2.vl (24.8 KB)
Hey, thanks a lot! That helped me a lot!
Best regards
Matthias
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.