The OnConnLost event occurs when the connection with remote server lost for some reason, at the moment of downloading the data. However you still can use some data which was already downloaded (Stream parameter).

There are following parameters which passes to the event handler:

Parameters

Meaning

ContentType

the media type of received data. For example if you downloaded usual text-file, the ContentType will be "text/plan". For HTML page ContentType will "text/html", for executable file  "application/binary" and "image/jpeg" for JPEG, JPG and JPE files.