how to implement a chat application?



  • Hello,
    so far all i did was using Qtcpsocket and Qtcpserver. But i don't have much idea on how to implement it with real time. When i googled for chat application in Qt . I have got few results like using websockets. should i need to buy managed websockets ? In order to fullfill my requirements ? All i need is to implement a chatting feature between the users in my App. Can any one please throw me some hints on how to do that? Thanks a lot



  • This post is deleted!

  • Lifetime Qt Champion

    Hi,

    You have an example in Qt's sources: Network Chat Example

    Otherwise you'll have to give more details about your use case.



  • @SGaist
    Thanks for the reply. If you're in a local network its fine but imagine an app in apple store and android store which is downloaded by millions of people. How do I make connection between them who are in different location and different network.Also, i have to host the database some where right or will the app store handle it for me? Assume like facebook messenger without calling feature. Is something not clear ? Let me know. Thanks


  • Lifetime Qt Champion

    Before starting to re-implement such a feature from the ground. Are you trying to create a new app like Viber or WhatsApp or is it a small feature in your application ? If it's the second solution, you should rather take a look at the existing protocol available like XMPP. There's e.g. QXMPP



  • @SGaist
    No i am not trying to create app like viber or whatsapp. It is a just a small feature in my app. i have to show users near to them, i hope i can do it with positioning. Then, they need to communicate between them through instant messaging.
    Thanks a lot for your example. Iooks like what i need. But before getting started. I would your advice like how exactly it works? what kind of server and hosting i need to buy to support QXMPP? since it is part of my application , will it be a complex application to develop using Qt? Thanks a lot..waiting for your advice


  • Lifetime Qt Champion

    In that case the QtWebSocket module is indeed a good starting point


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.