- Code: Select all
Archived Post
Hi Kashif
We currently do not have textchat built into our API. What we do have however is simple signaling that could be used to build text chat. If you store the chat messages yourself in the backend eg. in a database or even in a flat file then you can use our signaling API to tell people when someone sends a message. The signaling function is Session.signal() and just sends a signal with no contents. The idea is that you would use this signal to indicate that some data has changed.
For example a very basic text chat implementation could be to store a text file on your server for every session eg <session_id>.txt. The contents of the text file is the contents of the textchat for that session. Then every time someone sends a message they append their message to that text file and call the signal() function. When everyone in the Session receives the signalReceived they use an AJAX call to pull the contents of the updated text file. This implementation would obviously not scale very well to large text chats but you get the idea.
Hope that helps
Adam
On Dec 27 2010 at 10:00 PM ksoomro wrote:
- Hide quoted text -