This mode tries to solve a scenario where server and clients share a single database (server and clients are connected to the same physical database) and clients want to be notified every time other client has done any change on a dataset.
You can check in Demos folder, SQLLite/SingleDatabase demo.
Create a new Dataset Protocol Server and configure using the following properties
oServer := TsgcWebSocketServer.Create(nil);
oProtocolDataset := TsgcWSPServer_Dataset.Create(nil);
oProtocolDataset.Server := oServer;
oProtocolDataset.Dataset := <...your dataset..>;
oProtocolDataset.ApplyUpdates := true;
oProtocolDataset.AutoSynchronize := false;
oProtocolDataset.NotifyUpdates := true;
oProtocolDataset.UpdateMode := upRefreshAll;
>oServer.Port := 80;
oServer.Active := true;
Create a new Dataset Protocol Client and configure using the following properties
oClient := TsgcWebSocketClient.Create(nil);
oProtocolDataset := TsgcWSPClient_Dataset.Create(nil);
oProtocolDataset.Client := oClient;
oProtocolDataset.Dataset := <...your dataset..>;
oProtocolDataset.ApplyUpdates := true;
oProtocolDataset.AutoSubscribe := true;
oProtocolDataset.NotifyUpdates := true;
oProtocolDataset.UpdateMode := upRefreshAll;
oClient.Host := '127.0.0.1';
oClient.Port := 80;
oClient.Active := true;