All pastes #241680 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-11-06 14:17 UTC
rendered paste body
with 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;