2 Replies Latest reply on Jul 26, 2006 3:37 AM by Shrijal

    Help needed to develop MESSENGER


      I would like to develope an Instant Messenger with Flash 8.
      I have linux installed on my SERVER with php, mysql and amfphp and all are working fine.

      I have also designed the database required, but I do have a problem. Can anybody tell me the concept of messenger chating window....?? I mean to say how it is possible to send messages to the end user who is online in my list....?? What should I do to detect the window opened at his end and populate that msg. window with my message...??

      If anybody can help me out to understand the concept. Whether I should use the client's login session ID or the opened window to send the message or what...??

      Help for this topic will be highly appreciated.

      Thanks and regards,

        • 1. Re: Help needed to develop MESSENGER
          blemmo Level 1
          There are 2 ways to do a chat: have the server transmit the messages to the users or let the client ask the server for new messages. I'd recommend the first one, it's faster and also easier.
          For that, you'll need a socket connection clientside (XMLSocket) and a server process serverside. Now this is where the trouble begins, most web hosters don't allow you to start services on their servers. But as you mentioned you have your own server, this shouldn't be a problem. Pick a language of your choice or maybe use php to write the server, and let it manage the open connections, so when a new messages arrives, it can broadcast it to all other connections.

          If you won't or can't do it this way, your clients have to pull for the messages, meaning they have to ask the server in some interval for new messages, and load them if available. You can't actively send the messages to some user, they all have to get them by themselves. There's a tutorial on that way here: http://www.sephiroth.it/tutorials/flashPHP/flash_chat/.

          • 2. Re: Help needed to develop MESSENGER
            Shrijal Level 1
            Thanks for your kind reply with solutions. That is what I wanted, now I will solve my problem once I got the concept of XMLSockets.

            Thanks a lot once again.