How does the webapp chat app do, similar to Wechat's chat dialog box?

how does the webapp chat app do, like Wechat"s chat dialog box?

Mar.19,2022

long polling
Github has many open source projects, such as ideawu/icomet">https://github.com/ideawu/icomet

"

you can learn about websocket.io


if you don't consider the compatibility of old browsers, just use websocket

.

NodeJS's Socket.io, is said to be a Web chat tool with open source code in a few minutes.

Click here to see Demo

is very simple, do it yourself, get to know it, don't just watch and listen, it's useless.


1, simple and rude method: put the sender, receiver and message into the storage carrier (server memory, database, etc.) to achieve directional transmission.
2. As everyone said, you can use NodeJS's Socket.io, which is absolutely awesome! Believe me.


socket.io
Very useful.
And there is a simple demo:
https://github.com/bsspirit/chat-websocket
You can just use it.

and welcome to watch my socketIO-use demo:
https://github.com/sheilaCat/fullofstars
Get me one star,3Q~


here is a very simple example based on socket.io
http://tianmaying.com/course/chatroom/lesson/master


PHPWebIM, is a web chat room based on Swoole extended by PECL C, which supports WebSocket+Comet2 compatible protocols and can be used in all kinds of browsers, including IE.
http://webim.swoole.com/
https://github.com/matyhtf/PHPWebIM

.

Han Tianfeng, author of Swoole: Tiger Game LVB implements TCP's long-connection push service based on PHP+Swoole, which supports 500000 people to connect online at the same time with only two machines, with a peak push of 100000 messages per second. A complete push service scheme is established, which provides mobile online / offline PUSH, message persistence, online user and device status management, broadcast task distribution queuing, external call API and other functions.


websocket, workerman's asynchronous framework based on this and php's C extension swoole are both good choices. There are also some examples on github that you can refer to

.

http://www.didooe.com/?dt_portfolio=weidialog


try this
https://developers.connectycu.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b323c9-2b575.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b323c9-2b575.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?