I don't understand this part because I read the code written by others.Isn't webscoket only four built-in methods, onopen, onmessage, onerror, and onclose.
Here this $openws.ws is an instance of webscoket.But I saw that there is no chat_receipt method in the code at all, so why can it still be used? The backend has the same method name. Does it mean that webscoket can directly call the method determined by the backend through the instance, so even if it is connected, and then the backend can automatically push to the foreground by doing operations in this method?
Instances are like this.There is no such method at all