The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How to change player timeout from 10 sec (that unity automatically sets) to 2 sec

deepikabhansali
2017-06-13 07:23:45

HI,
There need to be 2 things done by unity:
a. if master client is not able to send a package then on master client switch that packet should be resend by the new master client automatically
b. allow users to set player time to live for a room as we want that player gets disconnected from photon within 2 sec of no response and photon does it after 10 sec

Comments

JohnTube
2017-06-13 11:53:06

Hi @deepikabhansali,

Thank you for choosing Photon!

First, I think let's start by defining things using Photon naming to avoid confusion:

  • Server Timeout: how long the server should wait for a client that is not showing any activity before considering him disconnected. This makes the client disconnected with cause:
    DisconnectByServerTimeout
    Timeout disconnect by server (which decided an ACK was missing for too long).
    This can't be changed for Photon public cloud.
  • Client Timeout: how long the client should wait for an ack from the server that is not showing any activity before considering disconnecting with cause:
    DisconnectByClientTimeout
    Timeout disconnect by client (which decided an ACK was missing for too long).
    More info on how to change this.
  • Player TTL: how long an inactive actor should stay inside a room before removing him. This can be set during room creation using RoomOptions.PlayerTTL.

I recommend you can read about "Host Migration and Master Client".

Back to top