If I understand well what you say, in may case, when I cut off voluntarily
the connection from server side, the datasocket must be closed and the
Connected property must be True. Is that ?
What I don't understand is :
-        if I launch a quitAsync => I've FTP Component not connected. And if
I laucn connectAsync, I've "Ftp already connected"
-        or if I'm waiting 2 or 3 seconds after cut of the connection,
Connected property set to false
In fact, I'm sorry but I don't understand. 
 
So in the case where there is a problem on the line and there is a brutal
disconnection, what can I test to know if I must launch a reconnection
without waiting for 2 or 3 seconds ?
Thanks a lot.
 
 
 
 
Arnold FLUTEAUX wrote:
> Indeed, Requestdone triggers but once time, the connected property is
> set to true.
> If I try to launch again a getasync command without reconnection, at
> this time I have an error and the Connected property is set to False.
> And side server, I launch FTPServer.disconnect property and the
> client is disconnected.
 
Nothing can be done at the same time ;-) 
So component behaviour is perfectly OK.
1) - Data connection is closed, RequestDone triggers, property Connected
is still TRUE.
2) - Control connection is closed, OnSessionClosed triggers, property 
Connected is now FALSE.  
 
Note that in order to make number 2 happen messages need to be
processed after number 1! But _never call ProcessMessages in RequestDone
or any other event handler. Instead you could post a custom message from
inside RequestDone and from the message handler check property Connected
again and decide what to do next.

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to