Datasnap.DSServer.TDSCallbackTunnel.BroadcastMessage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function BroadcastMessage(const Msg: TJSONValue; ChannelName: string = ''; const Timeout: Cardinal = CALLBACK_TIMEOUT;  const ArgType: Integer = TDBXCallback.ArgJson): Boolean; overload;
function BroadcastMessage(const CallbackId: string; const Msg: TJSONValue;  const Timeout: Cardinal = CALLBACK_TIMEOUT; const ArgType: Integer = TDBXCallback.ArgJson): Boolean; overload;

C++

bool __fastcall BroadcastMessage(System::Json::TJSONValue* const Msg, System::UnicodeString ChannelName = System::UnicodeString(), const unsigned Timeout = (unsigned)(0x1388), const int ArgType = 0x1)/* overload */;
bool __fastcall BroadcastMessage(const System::UnicodeString CallbackId, System::Json::TJSONValue* const Msg, const unsigned Timeout = (unsigned)(0x1388), const int ArgType = 0x1)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Datasnap.DSServer.pas
Datasnap.DSServer.hpp
Datasnap.DSServer TDSCallbackTunnel

Description

Sends a message asynchronously to the channel callback.

The BroadcastMessage method sends a message asynchronously to the channel callback. BroadcastMessage returns True if the operation is not timing out, False otherwise. BroadcastMessage has two overloads. The first overload must be called with the Msg, Timeout, and ArgType parameters, while the second overload has an additional CallbackId parameter preceding the other three.

The second overload of the BroadcastMessage method returns True if it is not timing out or there is no such callback, False otherwise.

CallbackId is a string representing the identifier of the callback.

Msg is a TJSONValue containing the message to be broadcasted.

Timeout represents the time-out interval in milliseconds. By default it is set as CALLBACK_TIMEOUT.

ArgType represents a JSON argument.

See Also