谢谢,寻路和leaber
大致就是这样,以下代码通过调试通过,贴出来留给以后需要的朋友.
var
Client_Addr: TSockAddr;
ClientLen: Integer;
recv_buff : string[100];
ret : integer;
i : integer;
xfdset : Tfdset;
xtimeval : TTimeVal;
begin
edit3.text := '';
for i := 0 to clients.Count - 1 do begin
fd_zero(xfdset);
fd_set(integer(clients),xfdset);
xtimeval.tv_sec := 0;
xtimeval.tv_usec := 50;
ret := select(0,@xfdset,nil,nil,@xtimeval);
edit3.Text := edit3.text + inttostr(ret) +'('+inttostr(integer(clients))+')'+ ',';
end;
......
end;