TsgcTURNClient › Methods › SendIndication
Sends a datagram to a peer wrapped in a SEND Indication (requires an active permission).
procedure SendIndication(const aPeerIP: string; aPeerPort: Word; const aData: string);
| Name | Type | Description |
|---|---|---|
aPeerIP | const string | IP address of the destination peer (must have an active permission). |
aPeerPort | Word | UDP port of the destination peer. |
aData | const string | Text payload to relay; converted to UTF-8 bytes before being wrapped in the SEND Indication. |
Wraps the payload in a SEND Indication (RFC 5766 section 10) and forwards it through the allocation to the specified peer. SEND Indications are unreliable and require that a prior CreatePermission has installed a permission for aPeerIP; otherwise the server drops the message.
oTURN.CreatePermission('203.0.113.25');
oTURN.SendIndication('203.0.113.25', 49200, 'hello');
procedure SendIndication(const aPeerIP: string; aPeerPort: Word; const aData: TBytes);
| Name | Type | Description |
|---|---|---|
aPeerIP | const string | IP address of the destination peer (must have an active permission). |
aPeerPort | Word | UDP port of the destination peer. |
aData | const TBytes | Raw byte payload to relay; used verbatim inside the SEND Indication. |
Binary-payload variant of the SEND Indication. Use this overload for non-text content (media, serialized packets, encrypted blobs) where the string form would corrupt the data with an encoding round-trip. Like the string overload, an active permission is required for aPeerIP.
var
vPayload: TBytes;
begin
SetLength(vPayload, 4);
vPayload[0] := $DE; vPayload[1] := $AD; vPayload[2] := $BE; vPayload[3] := $EF;
oTURN.CreatePermission('203.0.113.25');
oTURN.SendIndication('203.0.113.25', 49200, vPayload);
end;