Method WebSocketClient():handleMessage() Professional

Process the next message sent from the server

:handleMessage( [<lBlocking>] ) --> lHandled
The optional parameter lBlocking is a logical value that specifies if the method will block until a message was successfully processed. If the method :handleMessage() shall return immediately irrespective whether a message was handled or not then the parameter lBlocking must be false (.F.). By default the parameter lBlocking is true (.T.).

The method returns .T. (true) when a message was received from the server, otherwise .F. (false) is returned.


The method :handleMessage() handles a message that arrived from a connected websocket server. In case there is a message pending then :handleMessage executes :onText() or :onBinary() and returns true (.T.). If the client is no longer connected with the websocket server then false (.F.) is returned.

If .F. is passed with the parameter <lBlocking> then the method returns immediately irrespective whether a message was handled or not.

Typically this method is called within the event loop of the application from a dedicated thread responsible for message processing.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.