From: Paweł 'Nivertius' Płazieński on
Dennis Hoppe wrote:

> This approach works very well, but some ftp commands send a messages
> over several lines. I do not know in advance, how many lines I should
> read in. Subsequently, Ada.Streams.Read has to be called in a loop,
> which will eventually block, again.
>
> How can I query the stream, if new elements are ready to read?

Altrought you tried using a Control_Socket to read N_Bytes_To_Read. If
there's something in the local buffer, you can read without blocking.
Probably you can wait some time and test if there's something, if not, it
won't probably be sent. This can be good or a totally bad way to do it
[random latencies on the line for example]. Just passing around.

BTW It never work for me, I tried to use it several times. ;-))
Maybe you'll get more luck with it.

--
Pawe� P�azie�ski aka Nivertius
"In the end, there will be Ada, XML and gzip"