Hi Team,
Using Java websocket to connect to WebSocket API, unable to connect, but the network is normal,URL is ws://ip:port/WebSocket
Thanks
New posts are disabled while we improve the user experience.
You can browse the site, or for urgent issues, raise a query at MyAccount.
Hi Team,
Using Java websocket to connect to WebSocket API, unable to connect, but the network is normal,URL is ws://ip:port/WebSocket
Thanks
Hello @dreamjie2020
I am assuming that you are connecting to the local deployed RTDS. What is the version of ADS/RTDS server that you are using? The WebSocket connection needs at least ADS version 3.2.1 and above.
Additionally, did you enable the WebSocket connection in the ADS configuration yet?
Thank you for reaching out to us.
You can try the WebSocket Java Examples on GitHub.
Please see the instructions on that page regarding how to run the examples.
Moreover, you can test the WebSocket connection by using the curl command.
curl --no-buffer --header "Upgrade: websocket" --header "Connection: Upgrade" --header "Sec-WebSocket-Key: s595Nk+O22u2vOpCFHFAqQ==" --header "Sec-WebSocket-Version: 13" --header "Sec-WebSocket-Protocol: tr_json2" --header "Accept:" --header "User-Agent:" --header "Host:" -v http://ip:port/WebSocket
For example:
Did you receive any errors when running the application?