[NMS] Packet - Get Download Speed?

Discussion in 'Plugin Development' started by B3N909, May 23, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    B3N909

    Is there a way to get a players download speed?
     
  2. Offline

    mine-care

    @B3N909 ??? You mean ping?
    He's there is, in the resource section I have a utility :- )
     
  3. Offline

    Zombie_Striker

    @B3N909 Here's the line of code for my plugin.
    Code:
     int ping = ((CraftPlayer) player).getHandle().ping; // under 20 is good for outside players. under 5 is good for local host. Cannot have over 300 ping or it will be un-playable
     
  4. Offline

    B3N909

    @mine-care , @Zombie_Striker No.... I am talking about the speed of the players internet connection, as if you were to run a speed test. Ex: 23.8382MB/ps
     
  5. Offline

    mythbusterma

    @B3N909

    You could try timing how long certain packets and responses take, but your mileage may very significantly.
     
  6. Offline

    B3N909

    @mythbusterma That would be almost like just guessing based off ping... Is there any code examples someone could show me? Thanks!
     
  7. Offline

    mythbusterma

    @B3N909

    Send a relatively large packet of known size that causes a client response packet, subtract the time for their ping, there's your time, use it to calculate rate.
     
  8. Offline

    Cirno

    I want to correct your comment; you can have a ping over 300 and be in a playable state. It's when you start hitting anything over 400ish is when it gets really noticeable. However, I'm assuming we're just playing vanilla survival; if it's PVP, you'll need to have a ping under 100ms to be good.
     
  9. Offline

    mine-care

    @B3N909 i think you can try with keep alive packet to what all clients have to respond to.
     
Thread Status:
Not open for further replies.

Share This Page