type

 TScWebSocketOnMessageEvent = procedure (Sender: TObject; const Data: TBytes; MessageType: TScWebSocketMessageType; EndOfMessage: boolean) of object;

 

property OnMessage: TScWebSocketOnMessageEvent;

 

Description

The OnMessage event occurs if a data message was received from the WebSocket server.

If at least one message frame was received, the event occurs immediately, without waiting for the end of the message.

 

Parameters:

Sender - the object that raised the event;
Data - an array of bytes, which contains the body of the received message;
MessageType - types of a data message received from the server.
EndOfMessage - returns the status whether the message was read till the end. If the message was not read till the end, the parameter is set to False.

 

Note: if the event handler is set, the Receive and ReceiveMessage methods cannot be called. In this case, an exception will be generated when calling these methods.

 

See Also

OnControlMessage

 

SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support