Difference between SendPrivateChat and SendPrivateUpdate

0 votes
Hi,

I would like to know the main differences between the SendPrivateChat and SendPrivateUpdate function. I have been using SendPrivateUpdate since the start of my project, but recently i'm getting a BAD_Request error, from which I found that the byte array size was too large to be sent, but things got working properly when I use SendPrivateChat. Now i need to know is this the only defference between this two? If so, is the SendPrivateChat function is relaiable enough to send a big data?

Thanks.
asked Oct 12, 2014 in AppWarp by apratim.056 (28 points)

1 Answer

+1 vote
 
Best answer
Hi,

 

The difference between SendPrivateChat and SendPrivateUpdate is that SendPrivateChat sends the message in String format but SendPrivateUpdate sends the message in binary format. One takes the message in String format and other in binary array. There is limit in both the functions. SendPrivateUpdate restricts the byte message to 1000 bytes and SendPrivateChat restricts the string message to 500. But as you said that you are able to send the message using SendPrivateChat and not through SendPrivateUpdate. Could you please let us know which SDK and what version are you using?
answered Oct 12, 2014 by NaveenGShephertz (244 points)
selected Oct 13, 2014 by apratim.056
Hi,
Thanks for the feedback. I am surprised to know that its limited to 500 bytes, as last time i checked, my message size was 1080 bytes! But still I am able to send it through SendPrivateChat. And I am not sure about the version I am using, as I didn't find where to look at, but my best guess is its version 1.6. And just to be clear once more, the only difference between these two is that one takes byte array and the other takes string, nothing else?
Yes this is the only difference between the two.
Could you please let us know which SDK(Android/Java/Unity) are you using?
Unity Sdk. Thanks
Hi, SendPrivateUpdate limit is 1000 bytes. By mistake 500 got written. I have updated my answer.
For SendPrivateChat, we are testing it at our end that why it is not restriction above 500 length. We will update you asap.
ok thanks. Please update me about the SendPrivateChat length when you get it.
Although you can send string of more than 500 length, but it is not recommended to send the message above 500 If you are making a cross-platform app. Messages above 500 in length is not guaranteed and can give you BAD_REQUEST.
Length restriction has been kept intentionally as it can slow down your App/Game performance which defeats the purpose of real-time communication.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...