it shouldnt be blocked when you use Connect instead of BeginConnect.
in UI thread, you already call an async delegate, which will not block UI thread untill its callback method is done.
why do you need to use async method for Connect? It doesnt matter whether your thread (its a worker thread in this case, not UI thread, be careful) is blocked or not. and given your code, your worker thread doesnt do anything after calling BeginConnect, so there is no need to be using async method there.
__________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
Last edited by noobie; 02-18-2007 at 03:57 AM.
|