onReceivedMessage

public abstract void onReceivedMessage(Message message, ReceivedProfile profile)

Receives real-time or offline messages. Note: Switch threads to handle time-consuming operations.

Parameters

message

The received message object

profile

ReceivedProfile, which stores left (After the client successfully connects, the server will deliver all compensation messages in packages to the client, with a maximum of 200 messages per package. After receiving a package, the client will parse and notify the application message by message. 'left' indicates the number of remaining messages in the current package), hasPackage (Whether there are undelivered message packages on the server), offline (Whether the message is an offline message)