SendMessage

SendMessage 1:

This method is called when a message is to be sent to the WebSocket server.

Syntax

METHOD SendMessage: BOOL
VAR_INPUT
    pContent      : PVOID;
    nContentSize  : UDINT;
    bTextContent  : BOOL;
    bCompress     : BOOL;
END_VAR

SendMessage 2: Return value

Name

Type

Description

SendMessage

BOOL

If the message is sent successfully, the method returns the value TRUE.

SendMessage 3: Inputs

Name

Type

Description

pContent

PVOID

Pointer to the content.

nContentSize

UDINT

Size of the content in bytes.

bTextContent

BOOL

TRUE: Content is text, FALSE: Content is binary.

bCompress

BOOL

If set to TRUE, compression is used.