How do I use the photonServer to get the packet size transferred from the client ?

franchhero
edited August 2017 in Photon Server
hi sorry for my poor english
i want to get the datapacket Size from the client,and from the server
is here have any method to get the datapacket Size in photonServer?
thank you very much for help me!

Comments

  • Hi, @franchhero

    there is PeerBase.OnReceive method. it has parameter byte[] data. you may check size of data payload there. but it will be not what you expected.

    why do you need this size?

    best,
    ilya
  • Hi, @chvetsov

    I'm not an author of this post, but i want to see packets's size for determine bandwidth usage of my client for detecting current ping and latency. May be Photon have another suitable ways for this purposes?
  • hi, @kalibannez

    you may use properties of peer to get round trip time and round trip time variance

    look for PeerBase.RoundTripTime and PeerBase.RoundTripTimeVariance

    best,
    ilya
  • This is what i need? thank you, ilya!