Hmmm funktioniert leider nicht
mein code:
Delphi-Quellcode:
program thttpd;
{$APPTYPE CONSOLE}
uses
SysUtils, IdHTTPServer, windows, IDContext;
var
main_d:TidHTTPServer;
type
Thd =
class
procedure main_d_response(AContext: TIDContext);
// genaue Parameter nachschauen!
end;
procedure Thd.main_d_response(AContext: TIDContext);
begin
writeln('
New Response!!!');
end;
procedure init_d();
begin
main_d := TIdHTTPServer.Create();
main_d.DefaultPort := 8070;
main_d.OnConnect := main_d_response;
main_d.Active := true;
end;
begin
try
init_d;
readln;
except
on E:
Exception do begin
Writeln(E.Classname, '
: ', E.
Message);
readln;
end;
end;
end.
Ich bekomm den Fehler
Code:
[DCC Fehler] thttpd.dpr(67): E2003 Undefinierter Bezeichner: 'main_d_response'