N
netbug
Unregistered / Unconfirmed
GUEST, unregistred user!
我这里有个LAN,我想知道有谁在访问我,请看:
procedure TForm1.ServerSocket1Listen(Sender: TObject;
Socket: TCustomWinSocket);
begin
statusbar1.SimpleText:='Listen';
end;
procedure TForm1.ServerSocket1ClientConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Statusbar1.SimpleText:='connect';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
serversocket1.Port:=139;
serversocket1.Active:=true;
end;
可是别人通过网上邻居在访问我时,并没有在状态栏出现connect(有Listen),
后来我想让port从1到2000,请看:
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
for i:=1 to 2000 do
begin
serversocket1.Port:=i;
serversocket1.Active:=true;
if (连上) then (显示已连接)
else serversocket1.Active:=false;
end;
end;
end;
但我不知(连上) then (显示已连接)该如何写,请问:这里该如何写呢?
谢谢。
procedure TForm1.ServerSocket1Listen(Sender: TObject;
Socket: TCustomWinSocket);
begin
statusbar1.SimpleText:='Listen';
end;
procedure TForm1.ServerSocket1ClientConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Statusbar1.SimpleText:='connect';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
serversocket1.Port:=139;
serversocket1.Active:=true;
end;
可是别人通过网上邻居在访问我时,并没有在状态栏出现connect(有Listen),
后来我想让port从1到2000,请看:
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
for i:=1 to 2000 do
begin
serversocket1.Port:=i;
serversocket1.Active:=true;
if (连上) then (显示已连接)
else serversocket1.Active:=false;
end;
end;
end;
但我不知(连上) then (显示已连接)该如何写,请问:这里该如何写呢?
谢谢。