Re: idFtpServer check connected

Giganews Newsgroups
Subject: Re: idFtpServer check connected
Posted by:  Remy Lebeau (TeamB) (
Date: Mon, 5 Dec 2005

"Maarten" <notval…> wrote in message

> Is there a way check if the connected client is still active?

Everything in the FTP protocol is initiated by the client.  The server is
not allowed to send anything that is not a response to a command.  If the
client does not send any commands, the server has to just sit there waiting.

> is there a sort of NOOP command?

Not from the server to the client, no.

> The problem is, when the network connection of the client
> breaks down the server doesn't know.

It will if you implement timeouts in your server code.  A lot of servers
nowdays close connections when a client has been idle for too long without
sending any commands.  The easiest way to do that in TIdFTPServer is to use
the OnConnect event to set the ReadTimeout for the connection.




In response to

idFtpServer check connected posted by Maarten on Mon, 5 Dec 2005