Hello i'm having some issues making my class threaded. I'm following a tutorial and this guy says we have to inherit from TThread and then override Execute. That's cool but only overriding is not enough for me i need to overload it and add some arguments. I have a rest service that i want to make threaded so my idea was to make the getCommand of the idhttpServer on a thread. Therefore i wanted to add the Context, Request and Response as arguments of the command get. That's the code:
MyRest = class(TThread)
...some methods...
protected
procedure Execute(AContext: TIdContext;
ARequestInfo : TIdHTTPRequestInfo; AResponseInfo:TIdHTTPResponseInfo);overload; override;
end;
And then on my create i want to do this basicly:
FServer.OnCommandGet := Execute;
FServer is the TIdHttpServer.
The problem is that delphi cries already when defining the execute procedure. It says Execute differs from previous declaration
... this ... Of course it differs that's why i said overload. Any Ideas how i can do this?