Quantum 3
3.1.0
The SystemConnectionSummary (SBS) is useful to analyze low level connection issues in Unity. This requires a ConnectionHandler in the scene. More...
Public Member Functions | |
| SystemConnectionSummary (int summary) | |
| Creates a SystemConnectionSummary instance from an int (reversing ToInt()). This can then be turned into a string again. More... | |
| SystemConnectionSummary (RealtimeClient client) | |
| Creates a SystemConnectionSummary for an incident of a local RealtimeClient. This gets used automatically by the RealtimeClient! More... | |
| int | ToInt () |
| Turns the SystemConnectionSummary into an integer, which can be used for analytics purposes. It contains a lot of info and can be used to instantiate a new SystemConnectionSummary. More... | |
| override string | ToString () |
| A readable debug log string of the context for network problems. More... | |
Static Public Member Functions | |
| static int | GetErrorCode (int summary) |
| Extracts the recorded error code from a SystemConnectionSummary binary representation. More... | |
Public Attributes | |
| bool | AppOutOfFocus |
| True if the Unity app is out of focus / minimized. More... | |
| bool | AppOutOfFocusRecent |
| True if the Unity app was out of focus / minimized recently (past 5 sec). More... | |
| bool | AppPause |
| True if the Unity app is paused. More... | |
| bool | AppPauseRecent |
| True if the Unity app was paused recently (past 5 sec). More... | |
| bool | AppQuits |
| True if the Unity app is closing / shut down. More... | |
| bool | ErrorCodeFits |
| True if the Socket-level error code fits into the usual byte "budget". More... | |
| bool | ErrorCodeWinSock |
| True if the Socket-level error code is WinSock based. More... | |
| bool | NetworkReachable |
| True if the Unity engine tells us the network is reachable. More... | |
| int | SocketErrorCode |
| Socket-level error code (if any is available). More... | |
| byte | UsedProtocol |
| Which protocol is used. Refer to ConnectionProtocol. More... | |
| readonly byte | Version = 0 |
| Version of the SystemConnectionSummary type. More... | |
The SystemConnectionSummary (SBS) is useful to analyze low level connection issues in Unity. This requires a ConnectionHandler in the scene.
A RealtimeClient automatically creates a SystemConnectionSummary on these disconnect causes: DisconnectCause.ExceptionOnConnect, DisconnectCause.Exception, DisconnectCause.ServerTimeout and DisconnectCause.ClientTimeout.
The SBS can then be turned into an integer (ToInt()) or string to debug the situation or use in analytics. Both, ToString and ToInt summarize the network-relevant conditions of the client at and before the connection fail, including the PhotonPeer.SocketErrorCode.
Important: To correctly create the SBS instance, a ConnectionHandler component must be present and enabled in the Unity scene hierarchy. In best case, keep the ConnectionHandler on a GameObject which is flagged as DontDestroyOnLoad.
|
inline |
Creates a SystemConnectionSummary for an incident of a local RealtimeClient. This gets used automatically by the RealtimeClient!
If the RealtimeClient.SystemConnectionSummary is non-null after a connection-loss, you can call .ToInt() and send this to analytics or log it.
| client |
|
inline |
Creates a SystemConnectionSummary instance from an int (reversing ToInt()). This can then be turned into a string again.
| summary | An int, as provided by ToInt(). No error checks yet. |
|
inline |
Turns the SystemConnectionSummary into an integer, which can be used for analytics purposes. It contains a lot of info and can be used to instantiate a new SystemConnectionSummary.
|
inline |
A readable debug log string of the context for network problems.
|
inlinestatic |
Extracts the recorded error code from a SystemConnectionSummary binary representation.
| summary | Pass the value of SystemConnectionSummary.ToInt(). |
| readonly byte Photon.Realtime.SystemConnectionSummary.Version = 0 |
Version of the SystemConnectionSummary type.
| byte Photon.Realtime.SystemConnectionSummary.UsedProtocol |
Which protocol is used. Refer to ConnectionProtocol.
| bool Photon.Realtime.SystemConnectionSummary.AppQuits |
True if the Unity app is closing / shut down.
| bool Photon.Realtime.SystemConnectionSummary.AppPause |
True if the Unity app is paused.
| bool Photon.Realtime.SystemConnectionSummary.AppPauseRecent |
True if the Unity app was paused recently (past 5 sec).
| bool Photon.Realtime.SystemConnectionSummary.AppOutOfFocus |
True if the Unity app is out of focus / minimized.
| bool Photon.Realtime.SystemConnectionSummary.AppOutOfFocusRecent |
True if the Unity app was out of focus / minimized recently (past 5 sec).
| bool Photon.Realtime.SystemConnectionSummary.NetworkReachable |
True if the Unity engine tells us the network is reachable.
| bool Photon.Realtime.SystemConnectionSummary.ErrorCodeFits |
True if the Socket-level error code fits into the usual byte "budget".
| bool Photon.Realtime.SystemConnectionSummary.ErrorCodeWinSock |
True if the Socket-level error code is WinSock based.
| int Photon.Realtime.SystemConnectionSummary.SocketErrorCode |
Socket-level error code (if any is available).