Jump to content

Help with Callbacks in UniGui and Datasnap Server


Recommended Posts

Hi Farshad,


I need your help where you found the solution on the topic:




With your example works correctly sending a message to the DataSnap server, where it is returned to the session that made the submission, but in a simple project with UniGui, the message is not sent to all active sessions(clients).

The DataSnap Server, has natively control callbacks, where by recording a channel, when sending a message, the server returns the message to all active clients(sessions) registered on this channel.


I'm sending attached deploy file which has 3 simple projects. One is the TestCaseServer, which is a simple DataSnapServer. The other two are clients. The TestCaseClient.dpr is a VCL Forms and the other is called TestCaseClient_UniGui, a UniGui project.


To test you can do:

1) Turn on the DataSnap Server, Project TestCaseServer.dpr;

2) In TestCaseClient.dpr, you must activate the connection(SQLConnection) and run two or more instances of the client;

3) You must send messages between instances with b BroadCastToChannell button where you will see that all instances will receive the same message sent automatically.


With this test works ok. Close your clients and disable the connections(SQLConnection).


Keep active the DataSnapServer to test the UniGui project.


1) In TesteCaseClient_UniGui activate the connection(SQLConnection) and run the project(StandAloneServer = True);

2) Open two or more sessions in the browser and do the same test of TestCaseClient project, where you will see that the messages are not received by all the clients(sessions), only the session that sent the message, get the message again, but they should all receive the message because sessions were registered on the same channel.


Thanks for help Farshad, this funcionality is very important for my UniGui project.


Best Regards,


Cristiano Testai



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...