How does a chat room based on webscoket make private conversation?

Source: Internet
Author: User
So, I used PHP to do a websocket backend, you can send a message through pusher to the client of the subscription, so as to achieve a simple chat room function, and then want to further realize private chat, but do not know how to achieve better.

My idea is a private conversation. The client subscribes to a common theme, similar to a group chat with only 2 people, is that so?

Thank you!

Reply content:

So, I used PHP to do a websocket backend, you can send a message through pusher to the client of the subscription, so as to achieve a simple chat room function, and then want to further realize private chat, but do not know how to achieve better.

My idea is a private conversation. The client subscribes to a common theme, similar to a group chat with only 2 people, is that so?

Thank you!

I used Python, JS have done server client, do not know how to implement PHP (good tough AH)

The server can be individually forwarded to a specific client for the URL. (Of course, your server needs to be able to distinguish between the various client protocols)

For example, I create a python group chat, Ws://localhost/python, through/python, it's all right.

Inlet SET Channel

https://segmentfault.com/q/1010000004863 ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.