Anonymous
public text v1 · immutablewith sock do
begin
CreateSocket;
setLinger(true,10);
bind('0.0.0.0','4515');
writeln('Listening');
listen;
repeat
if terminated then break; //seems to break around here
if canread(1000) then
begin
ClientSock:=accept;
if lastError=0 then TTCPEchoThrd.create(ClientSock);
writeln('Listening');
end;
until false;
end;