You are not logged in.
Pages: 1
[Websockets] I would like to send all authenticated users a lot of different events. Can I do it without defining callback interface in any dedicated method parameter?
Based on Project31ChatServer.dpr, can I send the NotifyBlaBla without subscribing to any event by Join( ) method.
If it is not possible what is the right solution for subscribing to "all" events? Below is one of my ideas
type
IEvent1 = interface
procedure Event1(const parameter: string)
end
IEvent2 = interface
procedure Event2(const parameter: string; const Param2: array)
end
IEvents = interface()
public
procedure Subscribe(const callback: IEvent1);
procedure Subscribe(const callback: IEvent2);
...
procedure Subscribe(const callback: IEvent100);
Offline
So, you meant:
type
ICallbacks = interface
procedure Event1(const parameter: string);
procedure Event2(const parameter: string; const Param2: array);
....
procedure Event100(const parameter: string; const Param222: array);
end
IEvents = interface()
public
procedure Subscribe(const callback: ICallbacks);
Offline
Pages: 1