Simple Websocket Client in Java - Connection issue

前端 未结 1 1500
别跟我提以往
别跟我提以往 2021-02-09 14:17

I\'m trying to write a simple websocket client in Java to connect to a 3rd party WebSocket server (I have no access to the server).

I can connect and communicate with th

相关标签:
1条回答
  • 2021-02-09 14:56

    I found the issue - it was that the ws address required a '/' on the end of it when being run from a java client.

    JavaScript ws://192.168.0.25:9000

    Java ws://192.168.0.25:9000/

    Not sure why this is required in Java - but it solved the issue...

    0 讨论(0)
提交回复
热议问题