Photon Plugins API Documentation v5.0RC1

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 or there is some reason why application called peer.Disconnect 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...
 
const short SendBufferFull = -11
 Indicates the client sent too much data in a short period of time. More...
 
const short OperationDenied = -3
 Indicates that the client was disconnected by server because of a blocked operation. More...
 
const short OperationInvalid = -2
 Indicates that the client was disconnected by server because of an invalid operation. More...
 
const short InternalServerError = -1
 Indicates that the client was disconnected due to an internal server error. More...
 
const short GameFull = 32765
 Indicates that the client could not join because room just became full. More...
 
const short GameClosed = 32764
 Indicates that the client could not join because room was just closed. More...
 
const short PluginReportedError = 32752
 Indicates that the client could not join or was disconnected because a plugin reported an error. More...
 
const short JoinFailedPeerAlreadyJoined = 32750
 Indicates that the client could not join because already joined with same session token. More...
 
const short JoinFailedFoundInactiveJoiner = 32749
 Indicates that the client could not join because another inactive actor with same UserId or ActorNr exists in room. More...
 
const short JoinFailedWithRejoinerNotFound = 32748
 Indicates that the client could not rejoin because there is no inactive actor with same UserId or ActorNr in room. More...
 
const short JoinFailedFoundExcludedUserId = 32747
 Indicates that the client could not rejoin because UserId is in excluded users list. More...
 
const short JoinFailedFoundActiveJoiner = 32746
 Indicates that the client could not join because another client with same UserId or ActorNr already joined. More...
 
const short HttpLimitReached = 32745
 Indicates that the client was disconnected because a HTTP limit was reached. More...
 
const short OperationLimitReached = 32743
 Indicates that the client was disconnected because an operation limit was reached. More...
 
const short SlotError = 32742
 Indicates that the client could not join because room does not have enough spots for all expected users. More...
 
const short EventCacheExceeded = 32739
 Indicates that the client was disconnected because an events cache limit was reached. More...
 
const short ConnectionSwitch = 32735
 Indicates that the disconnected client was swapped for the active actor in the room because of a quick rejoin (using same session token). More...
 
const short ActorRemoved = 32734
 Indicates the client was disconnected because the corresponding actor was removed from a room. 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

◆ ActorRemoved

const short Photon.Hive.Plugin.LeaveReason.ActorRemoved = 32734
static

Indicates the client was disconnected because the corresponding actor was removed from a room.

◆ 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.

◆ ConnectionSwitch

const short Photon.Hive.Plugin.LeaveReason.ConnectionSwitch = 32735
static

Indicates that the disconnected client was swapped for the active actor in the room because of a quick rejoin (using same session token).

◆ ConnectTimeout

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

TBD: Not used currently.

◆ EventCacheExceeded

const short Photon.Hive.Plugin.LeaveReason.EventCacheExceeded = 32739
static

Indicates that the client was disconnected because an events cache limit was reached.

◆ GameClosed

const short Photon.Hive.Plugin.LeaveReason.GameClosed = 32764
static

Indicates that the client could not join because room was just closed.

◆ GameFull

const short Photon.Hive.Plugin.LeaveReason.GameFull = 32765
static

Indicates that the client could not join because room just became full.

◆ HttpLimitReached

const short Photon.Hive.Plugin.LeaveReason.HttpLimitReached = 32745
static

Indicates that the client was disconnected because a HTTP limit was reached.

◆ InternalServerError

const short Photon.Hive.Plugin.LeaveReason.InternalServerError = -1
static

Indicates that the client was disconnected due to an internal server error.

◆ JoinFailedFoundActiveJoiner

const short Photon.Hive.Plugin.LeaveReason.JoinFailedFoundActiveJoiner = 32746
static

Indicates that the client could not join because another client with same UserId or ActorNr already joined.

◆ JoinFailedFoundExcludedUserId

const short Photon.Hive.Plugin.LeaveReason.JoinFailedFoundExcludedUserId = 32747
static

Indicates that the client could not rejoin because UserId is in excluded users list.

◆ JoinFailedFoundInactiveJoiner

const short Photon.Hive.Plugin.LeaveReason.JoinFailedFoundInactiveJoiner = 32749
static

Indicates that the client could not join because another inactive actor with same UserId or ActorNr exists in room.

◆ JoinFailedPeerAlreadyJoined

const short Photon.Hive.Plugin.LeaveReason.JoinFailedPeerAlreadyJoined = 32750
static

Indicates that the client could not join because already joined with same session token.

◆ JoinFailedWithRejoinerNotFound

const short Photon.Hive.Plugin.LeaveReason.JoinFailedWithRejoinerNotFound = 32748
static

Indicates that the client could not rejoin because there is no inactive actor with same UserId or ActorNr in room.

◆ 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 or there is some reason why application called peer.Disconnect

◆ OperationDenied

const short Photon.Hive.Plugin.LeaveReason.OperationDenied = -3
static

Indicates that the client was disconnected by server because of a blocked operation.

◆ OperationInvalid

const short Photon.Hive.Plugin.LeaveReason.OperationInvalid = -2
static

Indicates that the client was disconnected by server because of an invalid operation.

◆ OperationLimitReached

const short Photon.Hive.Plugin.LeaveReason.OperationLimitReached = 32743
static

Indicates that the client was disconnected because an operation limit was reached.

◆ 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.

◆ PluginReportedError

const short Photon.Hive.Plugin.LeaveReason.PluginReportedError = 32752
static

Indicates that the client could not join or was disconnected because a plugin reported an error.

◆ PluginRequest

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

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

◆ SendBufferFull

const short Photon.Hive.Plugin.LeaveReason.SendBufferFull = -11
static

Indicates the client sent too much data in a short period of time.

◆ ServerDisconnect

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

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

◆ SlotError

const short Photon.Hive.Plugin.LeaveReason.SlotError = 32742
static

Indicates that the client could not join because room does not have enough spots for all expected users.

◆ 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.