Jump to content

Proper Socket.IO Latency Checking


ClusterAtlas
 Share

Recommended Posts

There are just far too many "dumb" implementations out there, hence we wrote this one where you work directly with Socket.IO's API:

Usefulness:

- Displaying the latency.

- Dropping the player when latency is too high.

- Using the latency as an Interpolation factor, especially in multiplayer sprite movements.

Check the server.js & client.js gist @ https://gist.github.com/servercharlie/f3c85dbbfa8308e83257dc2ee31cd7cc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...