Datasnap.DSServer.TDSServer.BroadcastMessage
Delphi
function BroadcastMessage(const ChannelName: string; const Msg: TJSONValue; const ArgType: Integer = TDBXCallback.ArgJson): Boolean; overload;
function BroadcastMessage(const ChannelName: string; const CallbackId: string; const Msg: TJSONValue; const ArgType: Integer = TDBXCallback.ArgJson): Boolean; overload;
C++
bool __fastcall BroadcastMessage(const System::UnicodeString ChannelName, System::Json::TJSONValue* const Msg, const int ArgType = 0x1)/* overload */;
bool __fastcall BroadcastMessage(const System::UnicodeString ChannelName, const System::UnicodeString CallbackId, System::Json::TJSONValue* const Msg, const int ArgType = 0x1)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Datasnap.DSServer.pas Datasnap.DSServer.hpp |
Datasnap.DSServer | TDSServer |
Description
Sends a message to all client callbacks.
The BroadcastMessage method sends a message to all client callbacks. BroadcastMessage has two overloads. Call the first overload with the ChannelName, Msg, and ArgType parameters.
The second overload sends a message to all client callbacks with a given registered callback identifier. For this purpose, an additional CallbackId parameter is required in the call.
ChannelName represents the name of the channel callback.
CallbackId is a string representing the identifier of the callback.
Msg is a TJSONValue containing the message to be broadcasted.
ArgType represents a JSON argument.