Skip to content

Delphi Labs: DataSnap XE - Callbacks

I was always intrigued by a possibility of doing callbacks in client/server, distributed applications. RAD Studio XE demos include "CallbackChannels" demo that shows how to use callbacks with different DataSnap communication protocols (TCP/IP, HTTP) and architectures (DBX, REST).

In this "Delphi Labs" episode I have tried to create the most simple example of using callbacks. Both client and server are Delphi VCL Forms applications. To keep it simple I’m only using TCP/IP and DBX. This tutorial covers broadcasting to a channel and notifying a specific callback.

Delphi Labs: DataSnap XE - Callbacks

{ 5 } Comments

  1. Navid | April 3, 2012 at 8:40 pm | Permalink

    Thanks for this,

    would it be possible to have callbackChannels when the client is a Firemonke application (iPhone)?


  2. Eli Neria | May 7, 2012 at 4:25 pm | Permalink

    Thanks for all your Videos
    I want to start with learning data snap and use it in my applications.
    where can i find all your videos on it to grab them and learn this fantastic issue.

    Thank you in advance.

  3. Dobrin Petkov | May 10, 2012 at 9:11 am | Permalink

    Hi Pawel,

    I learned many things from your very useful post. Thanks a lot - you are great as always.
    Is there any news on what exactly means "UseGlobalKey=true" and what if "UseGlobalKey=false"? (transport filters - RSA properties)
    If you’re busy - can you tell me the contacts for more details and or questions?

    Best regards
    Dobrin Petkov

  4. Freddie Bell | April 17, 2013 at 7:53 am | Permalink

    I’d like to suggest a 4th part, which is initiating the message send from the server. Your series only shows how to program call-backs from the clients to each other, which is good, but I want for example, say the server admin wants to shut down the server, they can send a "Please finish what you’re doing, server is going down in 5 minutes!" message to all clients from the server. Of course, once we can see how this is done, other kinds of callbacks initiated by the server will also be seen. Thanks for all your hard work. I have learned a lot.

  5. Pawel Glowacki | April 17, 2013 at 8:16 am | Permalink

    Please have a look at Chat demo that comes with Delphi and is typically installed here: "C:\Users\Public\Documents\RAD Studio\10.0\Samples\Delphi\DataSnap\ChatRoomDemo".
    In essence you need to call "Broadcast*" or "Notify*" methods on the DSServer component.
    I hope it helps,

{ 1 } Trackback

  1. [...] 集11:回调- – - – - -视频1, 视频2, 视频3, 白皮书, 源代码 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

Bad Behavior has blocked 1189 access attempts in the last 7 days.