Java websocket host?

前端 未结 5 1909
滥情空心
滥情空心 2020-12-16 01:04

I\'m trying some multiplayer game ideas out at the moment and am trying to create a Java application to serve a web browser based multiplayer game.

My development en

5条回答
  •  天命终不由人
    2020-12-16 01:40

    As no one yet really answered your question: the reason it does not work, is because you are not implementing the websocket specification. It takes of lot more work to setup a proper websocket connection than just opening a socket, as the websocket connection setup starts with a HTTP upgrade request. Your client is closing the connection, because it does not receive a positive answer on the upgrade request to start with.

提交回复
热议问题