Datasnap.DSPlatform.TDBXServerComponent.ConsumeClientChannel
Delphi
function ConsumeClientChannel(const ChannelName, ClientManagerId, CallbackId, ChannelNames: string;
const SecurityToken: string;
ResponseData: TJSONValue): TJSONValue;
C++
System::Json::TJSONValue* __fastcall ConsumeClientChannel(const System::UnicodeString ChannelName, const System::UnicodeString ClientManagerId, const System::UnicodeString CallbackId, const System::UnicodeString ChannelNames, const System::UnicodeString SecurityToken, System::Json::TJSONValue* ResponseData);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Datasnap.DSPlatform.pas Datasnap.DSPlatform.hpp |
Datasnap.DSPlatform | TDBXServerComponent |
Description
Heavyweight callback registration for thin clients.
ConsumeClientChannel can be called by a client using the REST API. This allows for registering:
- A callback with the server, to be invoked when messages are broadcasted to the server channel matching the given
ChannelName
. - The notification given that matches the values of
ChannelName
,ChannelId
, andCallbackId
.
The first time this is invoked (to register the callback), the value of ResponseData
should be empty string. To maintain the heavyweight callback, each time this function returns a response to the client, the client must quickly process that response and then invoke this method again. For each invocation after the first one, CallbackId
should be an empty string and 'ResponseData
should be a nonempty response from the client.