Simple Websocket Client in Java - Connection issue

前端 未结 1 1502
别跟我提以往
别跟我提以往 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)
提交回复
热议问题