Tp5.1 integrated think-worker cannot push messages in onMessage?

the message can be pushed in onConnect, and the message content sent by the client can be received in the onMessage method, but the message cannot be pushed to the client. Printing the message push result is successful, but the client does not receive the message pushed by the server

clipboard.png

clipboard.png
clipboard.png

Aug.09,2021

$connection- > send ('success') in onConnect; change it to $connection- > send (' pong'); try to receive pong
I think your code was uploaded to the server, and it is estimated that the upload was not successful.
if you still receive the success, the code is not passed successfully, or the restart workerman


is caused by a problem using the ngrok agent.

Menu