Hi! I'm building a app with buddy list, i found a question.
I check the CBManager.cs,there are not a function to send message between users in realtime.
the news is send to all users,and the mail is also write the mysql ,then read from mysql
How can i chat with other users?how can i send private message /public message?
Thank you!
HTTP connections are not made for realtime messaging, it's an asynchronous protocol. You could work around it by creating a coroutine or InvokeRepeating where you constantly load messages each X seconds.
FRANCESCO CROCETTI @ SKARED CREATIONS
HI!
I can use loadmails() in a Coroutine,run it each seconds to send/receive the private/public message?
Is that what you mean?
Exactly, but I won't call it each second because anyway it takes some time to receive the response from web, it's probably better to set the interval every 3-5 seconds. As mentioned HTTP is not really a protocol that fits realtime operations like a chat, but with a coroutine/InvokeRepeating you can simulate it.
FRANCESCO CROCETTI @ SKARED CREATIONS
Anyway it'll work only for private chats, that is one-to-one user chat. Maybe I'll implement a public channels asynchronous chat with next update if it's what you need.
FRANCESCO CROCETTI @ SKARED CREATIONS
Thank you!
I think we need a public channel to exchange messages, i building a iphone app with community, it has ability to add friends, read mails from mysql, etc.
Everything is ok,except the private/public message send between users.
Well, I think it really depends on the role of chat in your app. I mean, for example if your app is mainly centered on the realtime chat then I think you should really move the chat logic to a realtime synchronous protocol (like TCP) instead of HTTP because it will save both logic code mqnagement and will ensure realtime messaging (for example by using Unity networking or other third party packages, like Photon Server or SmartFox Server or other similar products). Else if the chat is not the primary feature of your app then you can work around it with the asynchronous callbacks as said above.
Anyway I will probably implement an asynchronous chat addon later this month for Combu, but cannot say an ETA because I'm a little busy with work at this time.
FRANCESCO CROCETTI @ SKARED CREATIONS
I can use a asynchronous chat for this app, i can use another third party soft like photon to do the realtime chat with combu in the sametime, or even use them to build game. That solve the problem maybe use in future.
by the way ,i test v1.4.2 and v1.4.1, the v1.4.1 is more support for win7 chinese, the v1.4.2 result log error when i create new user in the demo. I know v1.4.2 is ok in many other computers,but i have no time to find out in these days.
so i use v1.4.1 now,when i have more time, i will use v1.4.2 again for more test in win7 chinese.
thank you!