Photon Plugins API Documentation

Static Public Member Functions | Static Public Attributes | List of all members
Photon.Hive.Plugin.LeaveReason Class Reference

Code of the reasons why a peer may leave a room. More...

Static Public Member Functions

static string ToString (int reason)
 Stringify the leave reason code More...
 

Static Public Attributes

const byte ClientDisconnect = 0
 Indicates that the client called Disconnect() More...
 
const byte ClientTimeoutDisconnect = 1
 Indicates that client has timed-out server. This is valid only when using UDP/ENET. More...
 
const byte ManagedDisconnect = 2
 Indicates client is too slow to handle data sent. More...
 
const byte ServerDisconnect = 3
 Indicates low level protocol error which can be caused by data corruption. More...
 
const byte TimeoutDisconnect = 4
 Indicates that the server has timed-out client. More...
 
const byte ConnectTimeout = 5
 TBD: Not used currently. More...
 
const byte SwitchRoom = 100
 TBD: Not used currently. More...
 
const byte LeaveRequest = 101
 Indicates that the client called OpLeave(). More...
 
const byte PlayerTtlTimedOut = 102
 Indicates that the inactive actor timed-out, meaning the PlayerTtL of the room expired for that actor. More...
 
const byte PeerLastTouchTimedout = 103
 Indicates a very unusual scenario where the actor did not send anything to Photon Servers for 5 minutes. Normally peers timeout long before that but Photon does a check for every connected peer's timestamp of the last exchange with the servers (called LastTouch) every 5 minutes. More...
 
const byte PluginRequest = 104
 Indicates that the actor was removed from ActorList by a plugin. More...
 
const byte PluginFailedJoin = 105
 Indicates an internal error in a plugin implementation. More...
 

Detailed Description

Code of the reasons why a peer may leave a room.

Member Function Documentation

◆ ToString()

static string Photon.Hive.Plugin.LeaveReason.ToString ( int  reason)
inlinestatic

Stringify the leave reason code

Parameters
reasonLeave reason code
Returns
readable form of the leave reason

Member Data Documentation

◆ ClientDisconnect

const byte Photon.Hive.Plugin.LeaveReason.ClientDisconnect = 0
static

Indicates that the client called Disconnect()

◆ ClientTimeoutDisconnect

const byte Photon.Hive.Plugin.LeaveReason.ClientTimeoutDisconnect = 1
static

Indicates that client has timed-out server. This is valid only when using UDP/ENET.

◆ ConnectTimeout

const byte Photon.Hive.Plugin.LeaveReason.ConnectTimeout = 5
static

TBD: Not used currently.

◆ LeaveRequest

const byte Photon.Hive.Plugin.LeaveReason.LeaveRequest = 101
static

Indicates that the client called OpLeave().

◆ ManagedDisconnect

const byte Photon.Hive.Plugin.LeaveReason.ManagedDisconnect = 2
static

Indicates client is too slow to handle data sent.

◆ PeerLastTouchTimedout

const byte Photon.Hive.Plugin.LeaveReason.PeerLastTouchTimedout = 103
static

Indicates a very unusual scenario where the actor did not send anything to Photon Servers for 5 minutes. Normally peers timeout long before that but Photon does a check for every connected peer's timestamp of the last exchange with the servers (called LastTouch) every 5 minutes.

◆ PlayerTtlTimedOut

const byte Photon.Hive.Plugin.LeaveReason.PlayerTtlTimedOut = 102
static

Indicates that the inactive actor timed-out, meaning the PlayerTtL of the room expired for that actor.

◆ PluginFailedJoin

const byte Photon.Hive.Plugin.LeaveReason.PluginFailedJoin = 105
static

Indicates an internal error in a plugin implementation.

◆ PluginRequest

const byte Photon.Hive.Plugin.LeaveReason.PluginRequest = 104
static

Indicates that the actor was removed from ActorList by a plugin.

◆ ServerDisconnect

const byte Photon.Hive.Plugin.LeaveReason.ServerDisconnect = 3
static

Indicates low level protocol error which can be caused by data corruption.

◆ SwitchRoom

const byte Photon.Hive.Plugin.LeaveReason.SwitchRoom = 100
static

TBD: Not used currently.

◆ TimeoutDisconnect

const byte Photon.Hive.Plugin.LeaveReason.TimeoutDisconnect = 4
static

Indicates that the server has timed-out client.