how does the webapp chat app do, like Wechat"s chat dialog box?
how does the webapp chat app do, like Wechat"s chat dialog box?
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.
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.
Previous: IOS keyboard input character problem
now you need to make a front-end page for ipad pro2. Ui gave the design drawing 2732 to 2048. Should my page be set to the same size ?...
can you give an easy-to-understand brief description of how to achieve compatibility, or the principle ...
how do I wake up Hbuilder-packaged webapp through an H5 page? If you know, let me know, thank you! ...
do a survey, what are the current mainstream js frameworks for developing webapp, and what are their advantages and disadvantages? can you tell us what your company is using, as well as its advantages and disadvantages? It feels like there are only three...
iPhone X shows: : now I have a very strange problem. I have developed a web APP project, which uses Google browser, Android mobile phone and iPhone 7 test, but I can t get the data with iPhone X test. Does iPhone X need code compatibility? Please ...
can the mobile web page slide out of the sidebar from the edge of the screen? it can only be scanned from the side, instead of clicking the button or sliding in the whole page. ...
position:fixed;bottom: 0; perfect solution . It took me a long time to use height:100%;display:flex; align-self:end , found a position:fixed;bottom: 0; perfect solution I solved using height:100%;display:flex; align-self:end; *{ margin:...
usr local bin cordova run --emulator android Android Studio project detected ANDROID_HOME= usr local Caskroom android-platform-tools 27.0.1 JAVA_HOME= Library Java JavaVirtualMachines jdk-9.0.4.jdk Contents Home (node:24129) UnhandledPromiseRejectionWar...
WEBAPP has a requirement to load the map and display events on the map, and the function has been done, but because every time you load a page related to the map, you need to load the sky map, but every time you load the heaven and earth map, there will...
what are PWA and single-page applications and webAPP respectively? they seem to be about the same. I m a little confused. Can you give me a few examples? ...
I would like to ask all the great gods, if I plan to develop a webapp and then package it with hbuild, what should I pay attention to? At present, I intend to use vue family buckets for development, but seeing that HBUILD officially has its own MUI, I wo...
the opening and display on Wechat is abnormal, and the opening of other browsers is normal . < meta name= "viewport " content= "width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no " > <meta name=&quo...
I said two pages, not one page, two. Say important things three times. I said that when I enter the administration page, I will verify it. I am talking about from the login page to the administration page. (note that the login page is a separate page, ...
has been studying cordova to package the vue project into webapp,. I want to try to write a cordova plug-in myself, and then use js to call the result of this component execution. cordova project structure is as follows: 1. Create component...
how to install and debug the .app format file packaged by cordova? The project webapp, written for vue now needs to be packaged into ios version. After using mac for the first time, I finally got a .app format file through cordova build ios ...
looked at some similar cases. Some say yes and some say no. If webapp adds some entrance animation and so on to make it look like nativeapp, can it improve the probability of passing? Hope that experienced friends to help answer, thank you! ...
wrote a webapp (vue single-page application and packaged it with HBuilder. There is a function of listening to music offline after downloading. How to cache large audio files? localstorage maximum 5m bar, is there any other plan, thank you! ...
fill in the account password on the login page for the first time, adjust the login interface, and return a token at the backend. The previous consideration is that after filling in the account password and logging in, the user turns off webapp and opens...
ask me a question. What about the, web app immersive status bar? ...
demand: need to count the installation of desktop icons and desktop entry traffic I don t know if there are related API and events installation statistics, installation callback event Desktop Startup event about the first point: install callb...