CPC H04L 51/04 (2013.01) [H04L 51/23 (2022.05); H04L 51/224 (2022.05)] | 14 Claims |
1. A method for transmitting a live message, executed by a client end, and a persistent connection being established between the client end and a service end, the method comprising:
detecting periodically whether a second-type message sent by the service end through the persistent connection is received;
determining that the second-type message is not received for a period;
detecting a status of the persistent connection with the service end, in response to determining that the second-type message is not received for the period; and
in response to detecting that the persistent connection is in a disconnected status, re-establishing the persistent connection with the service end, and pulling a first-type message issued during disconnection of the persistent connection from the service end, wherein the pulling the first-type message during the disconnection of the persistent connection from the service end, comprises:
generating a request for pulling the first-type message, wherein the request for pulling the first-type message comprises a counted number of first-type messages that have been displayed at the client end; and
sending the request for pulling the first-type message to the service end, so that the service end returns the first-type message issued during the disconnection of the persistent connection, wherein the counted number of the first-type messages is compared with a first-type message identifier issued by a live stream room, and a first-type message corresponding to the first-type message identifier greater than the counted number and issued by the live stream room is determined as the first-type message returned by the service end.
|