Photon Plugins API Documentation
Static Public Member Functions | 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...
 

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

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

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

Indicates that the client called Disconnect()

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

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

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

TBD: Not used currently.

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

Indicates that the client called OpLeave().

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

Indicates client is too slow to handle data sent.

const byte Photon.Hive.Plugin.LeaveReason.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.

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

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

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

Indicates an internal error in a plugin implementation.

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

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

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

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

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

TBD: Not used currently.

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

Indicates that the server has timed-out client.