Announcement

Collapse
No announcement yet.

how to cancel FTP.Connect

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to cancel FTP.Connect

    Why do FTP.Connect function do not have the CallbackFunction?
    so can not cancel when is connecting.
    Is there any way to cancel FTP.Connect?

  • #2
    A socket connect is a single operation, which or concludes successfully or not. The time it takes to end the connection attempt depends on the timeout interval set on the socket. If you want that the connection attempt takes less than the default (which is 20 seconds for all Windows sockets operations), then change the timeout FTP.SetConnectTimeout() before you try to connect. If you want a more technical explanation why it is impossible to have a callback during the connection, please read about socket operations, WinINet, etc.

    Ulrich

    Comment

    Working...
    X