procedure Send(const Buffer; Count: integer; MessageType: TScWebSocketMessageType = mtBinary; EndOfMessage: boolean = True); overload;

procedure Send(const Buffer: TBytes; Offset, Count: integer; MessageType: TScWebSocketMessageType = mtBinary; EndOfMessage: boolean = True); overload;

procedure Send(const Str: string); overload;

 

Description

Call the Send message to send a data message to a WebSocket server.

The method allows splitting a large message into fragments and sequentially sending them to the server using the EndOfMessage parameter.

 

Parameters:

Buffer - an array of bytes, which contains the sent message body;
Offset - zero-based byte offset in Buffer that points to the beginning of the data location;
Count - the amount of data, which will be sent;
MessageType - types of the sent data message.
EndOfMessage - determines a status whether the message is complete or whether data related to this message will be further added. This allows you to break one large message into fragments and send them to the server one by one. You can set automatic splitting of a large message into fragments by setting the TScWebSocketClientOptions.MaxFragmentSize property.

 

If the method is called with the only parameter Str, MessageType is considered equal to mtText, and the message is considered complete.

 

See Also

Receive

 

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