OverflowException: Number overflow
Options
I found that the maximum amount of photon server single transmission of data only 8kb, is there any way to improve the amount of single transmission of data?
If the amount of data transmitted more than 8kb, unity client will be wrong ——
But now I can not transfer files over the 8kb.
If the amount of data transmitted more than 8kb, unity client will be wrong ——
OverflowException: Number overflow. ExitGames.Client.Photon.Protocol.DeserializeString (System.IO.MemoryStream din) ExitGames.Client.Photon.Protocol.Deserialize (System.IO.MemoryStream din, Byte type) ExitGames.Client.Photon.Protocol.DeserializeParameterTable (System.IO.MemoryStream memoryStream) ExitGames.Client.Photon.Protocol.DeserializeOperationResponse (System.IO.MemoryStream memoryStream) ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuff) ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () ExitGames.Client.Photon.PhotonPeer.Service () PhotonManager.Update () (at Assets/Scripts/PhotonManager.cs:36)I would like to use the photon server to do the game's hot fix.
But now I can not transfer files over the 8kb.
0
Best Answer
-
Hi @JansonC.
Please see my response to a related topic at http://forum.photonengine.com/discussion/comment/36551/#Comment_36551
Are these 8k bytes all a single string?
The maximum size for a single string is 32k characters.
When your data exceeds this limit then you may split it up into multiple chunks and send those as an array of strings or a Dictionary of string values or simply convert your string to a byte array (the maximum size for those is 2GB, so you will run into lots of other practical limits long before hitting the byte-array size limit).
That said as 8k bytes is below 32k characters, sending a 8kb string should actually work. If it does not work with the client SDK and version that you use, then please send us a bug-report to developer@exitgames.com and mention the Client SDK platform and the Client SDK version and please provide reproduction code.6
Answers
-
Hi @JansonC.
Please see my response to a related topic at http://forum.photonengine.com/discussion/comment/36551/#Comment_36551
Are these 8k bytes all a single string?
The maximum size for a single string is 32k characters.
When your data exceeds this limit then you may split it up into multiple chunks and send those as an array of strings or a Dictionary of string values or simply convert your string to a byte array (the maximum size for those is 2GB, so you will run into lots of other practical limits long before hitting the byte-array size limit).
That said as 8k bytes is below 32k characters, sending a 8kb string should actually work. If it does not work with the client SDK and version that you use, then please send us a bug-report to developer@exitgames.com and mention the Client SDK platform and the Client SDK version and please provide reproduction code.6