Show characters typed while typing (on the fly)

In the introductory Google Wave video, they talk about a chat problem in web applications. In many web applications, you see a message like: <name> is typing..(before sending the message)

Google came up with the idea of ​​"showing every character typed while typing" to avoid this annoying message.

How do you create something like this?

+3
source share
2 answers

If I were writing a solution, I would use PHP sockets and use the UDP protocol, which is more suitable for this scenario. UDP is unreliable, but much faster than TCP, which is most often used for communication. Therefore, I assume that I will have a very lightweight PHP script that sends a couple of bytes of data to the processing server using UDP. Use AJAX to send data to a PHP script. Of course, there will be a delay, but UDP will significantly speed up the transaction.

+2
source

. , , , . , Comet Ajax, HTML5 WebSockets. .

+1

Source: https://habr.com/ru/post/1774144/


All Articles