Added a new type of server communication with the client. Long polling.
This type is a bit slower than web sockets, but the chat will still be in real time.
This type does not require additional configuration. You just need to specify the maximum duration of the request.
I advise you to set 15-25 seconds.
This type loads the server more than web sockets.
There is the possibility of developing new adapters for the exchange of information between users (for example, redis or memcache instead of a database)