How to change player timeout from 10 sec (that unity automatically sets) to 2 sec
The whole answer can be found below.
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).
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
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: DisconnectByServerTimeoutThis can't be changed for Photon public cloud.
Timeout disconnect by server (which decided an ACK was missing for too long). - 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: DisconnectByClientTimeoutMore info on how to change this.
Timeout disconnect by client (which decided an ACK was missing for too long). - 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