TTMSFNCWebSocketConnection.SendSimpleFrame Method
Sends a control frame such as ping, pong, or close.
API unit family: TMSFNCWebSocketCommon
Declaring type: TTMSFNCWebSocketConnection
Syntax
procedure SendSimpleFrame(AOpcode: TTMSFNCWebSocketFrameOpcode; aData: TBytes = nil; const AMasked: Boolean = False);
Parameters
| Name | Description |
|---|---|
AOpcode |
Control opcode to send; must be a close, ping, or pong opcode. |
aData |
Optional control payload bytes. Defaults to nil. |
AMasked |
When True, the payload is masked before sending. Defaults to False. |
Exceptions
| Exception | Description |
|---|---|
EWebSocket |
Raised when the opcode is not a control opcode. |