Events clarification

I’m doing a few experiments with events, and I have a question. My experiments centre around a Delphi client and a c# server but the questions I have apply to all platforms I guess. My question is :

If I subscribe the client to events on the server side using SubscribeClientEventSink, BUT do not register any handlers for a particular client (perhaps there are no forms which are interested in being notified), are the events and more importantly any data sent to the client regardless?

I’d like to know what kind of data flow is going to happen between server and client and if it is possible to reduce it by not registering handlers except when necessary.

I think I may have answered my own question in that I think the event is fired (and any data passed to the client) regardless of whether there are any registered handlers.

But please confirm whether I am correct in this?

The reason I would like to be certain as I was wondering if it was actually worth splitting up the events into separate events for different objects or not. As an example, say I have 2 different object types and the server needs to notify the clients when something happens to those objects. now one way of doing this is:

interface IMyEvents : IROEventSink
{
void OnNotify(string objectName);
}

Then if on the client a specific form is only interested in object1 then the code would be something like :

procedure OnNotify(const ObjectName: UTF8String);
begin
if ObjectName = ‘Object1’ then
DoSomething;
end;

OR I create two events :

Interface IMyObject1Events : IROEventSink
{
void OnNotify();
}

Interface IMyObject2Events : IROEventSink
{
void OnNotify();
}

and now the form which is interested in object1, but not object 2 can just register a handler for object 1 and implement the interface thus

procedure OnNotify;
begin
//no need for this line
//if ObjectName = ‘Object1’ then
DoSomething;
end;

If there are no registered handlers for the second interface then have I saved some network traffic? I think not.

imagine case when a server need to send updated files to clients.
you can implement it as ReceiveFile or as ReceiveNonVideoFile/ReceiveVideoFile.
one client should receive only non-video files.

in 1st case, client will receive all files and should has check like

if is_video(aFileName) then  ...

in second one, server will send to client only non-video files because client is subscribed to ReceiveNonVideoFile only.

How do you think, in which case network traffic will be lower?

The problem I have is the same client needs both video and non video events, but not always. So if the video form is open I want the video events, but if it is not open I want just the non video ones,

you can create custom server method so client can say what events it wants receive.
by other hand, you can pass to server additional parameters at login like ReceiveVideo=1 so server can subscribe client to events according to these parameters.

I see a few ideas I can work with there.

Thanks a lot.