5 USES ServerLoop
,Chat
,SysUtils
,MemStream
,NetAddr
,opcode
,Download
,Store1
;
12 procedure HardTimeout
;
17 write('TestFS: ',job
^.state
);
18 if job
^.state
=stError
then write(job
^.error
,'-',job
^.error2
);
19 writeln(' total=',job
^.total
,' done=',job
^.done
);
20 Shedule(800,@Periodic
);
25 writeln('TestFS: rekt');
26 UnShedule(@HardTimeout
);
28 FreeMem(@self
,sizeof(self
));
31 procedure t
.HardTimeout
;
33 writeln('TestFS: hardtimeout');
34 //ch.DisposeHook:=@Rekt;
47 assert(OptParamCount(oi
)=1,opt
+'(rcpt:tNetAddr)');
48 writeln('TestFS: rcpt '+paramstr(oi
+1));
49 new(o
); with o
^ do begin
50 Shedule(20000,@HardTimeout
);
51 Shedule(20,@Periodic
);
52 FillChar(fid
,sizeof(fid
),0);
53 job
:=NewJob(paramstr(oi
+1),fid
);
54 if job
^.state
=stStop
then job
^.Start
;