Is there an alternative of ajax that does not require polling without server side modifications?

后端 未结 6 908

I\'m trying to create a small and basic \"ajax\" based multiplayer game. Coordinates of objects are being given by a PHP \"handler\". This handler.php file is being polled e

6条回答
  •  孤城傲影
    2020-12-11 16:14

    One thing to add on the long polling suggestions: If you're on a shared server, this solution will have limited scalability, as each active long poll will keep a connection (and a server-side process to service that connection) active. Your provider most likely has limits (either policy-defined or de facto) on the number of connections you can have open at a time, so you'll hit a wall if you have more sessions/windows than that playing concurrently.

提交回复
热议问题