吕雪松 (2001-02-27 09:22:00)
给你来个简单的吧!
procedure TForm1.Timer1Timer(Sender: TObject);
var
I : integer;
begin
Memo1.Clear;
for I := 0 to 1000 do begin
ServerSocket1.Close;
ServerSocket1.Port := I;
try
ServerSocket1.Open;
except
Memo1.Lines.Add(IntToStr(I) + '端口被打开!');
end;
end;
end;