When the live broadcast platform sends gifts and barrages, how does the message server confirm that the messages are sent by the currently logged-in user?

WBOY
Release: 2016-08-18 09:15:47
Original
1228 people have browsed it

The user clicks to send a gift and sends the message to the message server. The message server requests the back-end interface to modify the database and broadcast the message. Is this process correct?
I don’t know much about the message server, so how does it confirm that the message is sent by the currently logged in user?

Reply content:

The user clicks to send a gift and sends the message to the message server. The message server requests the back-end interface to modify the database and broadcast the message. Is this process correct?
I don’t know much about the message server, so how does it confirm that the message is sent by the currently logged in user?

The request will bring the authentication token, which is usually in the cookie. The server can just check it.

cookie and session

cookie uniquely identifies the session
session and saves whether you are logged in and other information

https://www.baidu.com/s?wd=co...
https://www.baidu.com/s?wd=se...

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template