Dataset eSeGeCe WebSockets Protocol

Publish subscribe architecture

Messages are delivered asynchronously (“push”) through publish subscribe architecture.


Updates automatically all changes on dataset.

Broadcast all Changes

Every time there is a new record, update or delete, changes are broadcasted to all clients subscribed.

Create Connection

// Create websocket client and set server options
oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := '';
oClient.Port := 5414;

// Create SGC protocol and assign to websocket client
oDataset := TsgcWSPClient_Dataset.Create(nil);
oDataset.Client := oClient;
oDataset.DataSet := myDataset;

// Handle Dataset methods
oDataset.OnDatasetConnect := OnDatasetConnectHandler;
oDataset.OnDatasetDisconnect := OnDatasetDisconnectHandler;

// connect to server
oClient.Active := True;

Dataset protocol allows to link any dataset and broadcast all changes to all clients subscribed automatically.