indy10中TIdTCPConnection.Connected函数的源码:
function TIdTCPConnection.Connected: Boolean;
var
// under ARC, convert a weak reference to a strong reference before working with it
LIOHandler: TIdIOHandler;
begin
// Its been changed now that IOHandler is not usually nil, but can be before the initial connect
// and also this keeps it here so the user does not have to access the IOHandler for this and
// also to allow future control from the connection.
LIOHandler := IOHandler;
Result := Assigned(LIOHandler);
if Result then begin
Result := LIOHandler.Connected;
end;
end;