Server to Client Ping Paket Breakdown

Hi,

I am new, so please forgive me when I am posting in the wrong section.
Currently I am analyzing traffic of a game to get a little known to how Photon works and what things are being sent over the wire.

I downloaded the Server On Premise SDK where I found the Photon.SocketServer library. I did that because I clearly dont understand how the Ping Packet works.

The client sends 5 bytes to server (first byte indicating that its a ping packet (hex value 0xF0), rest four bytes is an integer with TickCount of client.

But the game I am analyzing gets a Ping packet of 9 bytes back. Last 4 bytes of this packet is same like the client sent, but the integer before those last 4 bytes is unknown to me.. So I decided to look into the Photon Server and find the Ping sending...And I found SendPing function but it also does only send 5 packets to client which is what I dont understand..

Here a screenshot of the server ping packet to client.: https://puu.sh/yVv0I/4444bed65d.png

Hope you can help me out.
Thanks

Comments

  • Hi @Yothri,

    Thank you for choosing Photon!

    This is the right category and you asked some interesting good question!

    First I want to invite you to read more about the "Binary Protocol" used by Photon.
    We could discuss further after that.
  • JohnTube said:

    Hi @Yothri,

    Thank you for choosing Photon!

    This is the right category and you asked some interesting good question!

    First I want to invite you to read more about the "Binary Protocol" used by Photon.
    We could discuss further after that.

    Hi @JohnTube
    I already read that, and I know there is also the size of a ping packet described, but in not a single case the game I am analyzing a packet of only 12 bytes got sent.. Ping packet is 5 bytes from client and 9 bytes from server. I know that the first byte is the indication byte 240 (0xF0). The last 4 bytes are Environment.TickCount in Big Endianess-order.

    And that last 4 bytes are also the last 4 bytes of the server packet, but I dont know what the 4 bytes after the (first) indication byte are.

    Thanks in advance
    Best Regards
  • @chvetsov
    could you shed some light here?
  • chvetsovchvetsov mod
    edited January 10
    on the way back you server sends his timestamp too. it is done from native part. server timestamp contains time from server start

    best,
    ilya
  • @chvetsov and @JohnTube

    Allright, thank you very much for enlighten me. That helps me a lot.
Sign In or Register to comment.