WebSocketClient.Read (METH)ΒΆ
METHOD Read : NBS.ERROR
Read incoming messages.
If a message was received, then the message is copied to pData and xReceived is set to TRUE.
udiCount corresponds to the size of the received data.
Bemerkung
This method MUST be called in each cycle because the method also handles other requests in background (ping, pong etc.). The method can be called directly OR via the function block WebSocketRead.
- InOut:
Scope
Name
Type
Comment
Return
ReadNBS.ERRORInput
pData__XWORDPointer to the payload data
udiSizeUDINTMaximum size of the payload
Output
udiCountUDINTSize of the received data
xReceivedBOOLTRUE if data received
eFrameTypeType of the payload
xIsFinalFragmentBOOLFALSE if the payload is incomplete and is sent via multiple packets. TRUE, if the payload is complete or if the payload was incomplete and this packet is the last packet of a message.