Method WebSocketClient():handleMessage() Professional

Process the next message sent from the server

Syntax
:handleMessage( [<lBlocking>] ) --> lHandled
Parameters
<lBlocking>
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.).
Return

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

Description

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.

Feedback

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.