Form my main app I want to send some messages to the connected clients. I’ve implemented the eventhandler / event repository.
However most samples are built around events being triggered in the Implementation unit. I know there is a boradcast server but adding another server for some simple messages seems overhead.
What is the preferred way to send a message to all connected clients?
I have done this from the fServerDataModule but it does not seem right:
AList := TStringList.Create();
for i := 0 to AList.Count-1 do
ev := (ROEventRepository as IPlayerEventSink_Writer); ev.ExcludeSender := False; ev.MyProc(StringToGUID(AList[i]),MyParam);
Second question is where to place the RegisterEventClient for this scenario. I’ve done that in the RORemoteDataModuleActivate now which works but the unregister in the Deactivate does not work.