Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: TidFTPSever turn of server safe?

www.cryer.info
Managed Newsgroup Archive

Re: TidFTPSever turn of server safe?

Subject:Re: TidFTPSever turn of server safe?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Sat, 3 Mar 2007 00:58:18

"Frankie" <frankjohnsson2000@yahoo.se> wrote in message
news:45e8f2d6@newsgroups.borland.com...

> Why donīt you just tell me what property i should look for?

I already have.  Please re-read my earlier replies again more
carefully.

> I found:
> FtpServer.Context but there are no User information there...
> all i got is a locklist property/method

Then you did not pay attention to what I actually told you.  I will
say it again:

>> In the ... Contexts ... list, the server holds ...
TIdFTPServerContext ...
>> object instances, one for each client.  That will tell you how many
clients
>> are connected, and [TIdFTPServerContext] have a UserName property
>> available, so you will know who is logged in.

For example:

    uses
        IdObjs;

    var
        List: TIdList;
        I: Integer;
        Ctx: TIdFTPServerContext;
    begin
        List := IdFTPServer1.Contexts.LockList;
        try
            for I := 0 to List.Count-1 do
            begin
                Ctx := TIdFTPServerContext(List[I]);
                ShowMessage(Ctx.Username);
            end;
        finally
            IdFTPServer1.Contexts.UnlockList;
        end;
    end;


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive