I currently use the synchronous Connect method, and catch exceptions that occur, like if the password I'm using is invalid. So if I want the connection attempt to timeout, could I do an asynchronous attempt with BeginConnect and do my own timeout with something like a WaitOne? And you don't HAVE to use a callback method, correct? I currently do something similar with TCP socket connections. For Example:
ar = myFTP.BeginConnect(Nothing, Nothing)
ConnectResult = ar.AsyncWaitHandle.WaitOne(Timeout, False)
If (ConnectResult) Then
myFTP.EndConnect(ar)
Else
myFTP.AbortAsynchronous(True)
End If
Would this work? And in this case, when would exceptions be thrown? On the EndConnect?