OnWebSocketClose

OnWebSocketClose 1:

This method must not be called by the user. Instead, you can derive from the function block FB_IotWebSocketsClient and override this method. When the Execute() method is called, the responsible TwinCAT driver has the option of calling the OnWebSocketClose() method in case of an incoming Close Frame.

Syntax

METHOD OnWebSocketClose: HRESULT
VAR_INPUT
    statusCode     : UINT;
    content        : PVOID;
    contentLength  : UDINT;
END_VAR

OnWebSocketClose 2: Return value

Name

Type

Description

OnWebSocketClose

HRESULT

This return value can be freely selected.

OnWebSocketClose 3: Inputs

Name

Type

Description

statusCode

UINT

WebSocket status code as defined in RFC 6455.

content

PVOID

Pointer to the content.

contentLength

UDINT

Size of the content in bytes.