【问题标题】:Creating a Instant Messaging using HTTP & JSON使用 HTTP 和 JSON 创建即时消息
【发布时间】:2012-07-03 07:57:47
【问题描述】:

任何人都可以指导我或提供链接,以便我可以继续前进。我如何在应用程序中进行即时消息传递。我想将消息从一台设备发送到服务器,并且从服务器我应该使用 HTTP 以 JSON 格式返回到另一台设备。我浏览了许多网站,但没有得到正确的想法。所以请如果你知道给我一些想法。

非常感谢..

【问题讨论】:

    标签: android json http instant-messaging


    【解决方案1】:

    有 IM 应用程序..

    step 1 : Send the msg to server as a json object to server.
    step 2 : keep running response thread for every seconds.
    step 3 : Server sends the msg to requested user as a json object.
    step 4 : server takes the msg from requested user and sends back as a response. which is running on other thread.
    

    【讨论】:

    • @BenCheng for TCP 协议 WebSocket 将是替代方案。
    猜你喜欢
    • 1970-01-01
    • 2013-08-17
    • 2017-11-12
    • 1970-01-01
    • 1970-01-01
    • 2010-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多