Chat API : send image ?
Options
Comments
-
Chat AP allows exchange with any Photon-serializable data including byte arrays (chat messages are objects, not strings).
It's up to you how to use this data.0 -
Hi,
Thanks for your quick reply!
Great news !
And about historic ? How many times do you keep the message in your database ?
Thanks again !0 -
dontonka wrote:is there any limitation regarding the size of the array?
However this is more of a theoretical limit, because Photon is optimized for small real time messages, not for big file transfers, so you may run into performance issues and other unforeseen problems when trying to send files that are multiple megabytes in size. From my experience TCP works a lot better than UDP when transferring messages with a size of more than 10kb or so through Photon.0 -
From my experience TCP works a lot better than UDP when transferring messages with a size of more than 10kb or so through Photon.
Don T.0 -
I think Photon switch automatically to TCP when packet are bigger than ~1200 Bytes correct?In my game I'm using standard Photon RPC to transfer image, as a byte array as indicated by vadim, and that is working fine, so it should works the same with the chat API.How many times do you keep the message in your database ?
Once all leave the channel the channel is discarded and history is gone.0 -
We are using Photon Chat with Unity and the byte array in our message object seems to be limited to some value around 16000 bytes. When we use UDP, we don't get any error but we never receive the messages over a certain limit. When we use TCP, we get an error on the sender side saying: Receiving failed. SocketException: ConnectionReset.
We are far from the 2GB limit...
Is there a setting on the chat client we need to set?0 -
Hi,
32000 bytes message works fine for me with TCP. Can you send a repro case which i can run on my side?
If it will work, maybe this is related to your network configuration somehow.0