hmm that long? are u sure? i remember that in vb6 timers interval was a long value but even there it had a limit inferior to long's value limit i think..or not?!
hmm well... i have an app that will try to connect to another app over a network, in case it doest make it he will try in X time that will be defined by the client, and in the most cases should be something like 30min to 2h..thats why i made that question lol
well actually i am using a third-party class dll and it doesnt seem to have the connection-timeout thing...and why should i use threading? i really dont get it..i have the ideia that putting this app with more threads will just turn it to more complex with no reason..maybe i should use gettickcount(or time i dont remember exactly) to do that?
otherwise using threads what was ur idea? create a thread and then stop it and resume it?
Sleep method , can sleep for seconds , minutes , even days plus it accepts timespan .
You can give your threads high priority to be executed immediately after system threads . It can be suspended (just like system hibernation) . It's really really boosts your program performance !
i dont get it. i have a thread1 that calls the CONNECT() sub.
the sub tries to connect but cant connect..then how would it be able to wait the x time? notice how the connect() is about to finish because it has no more code left..and i dont want to make a recursive call to the function itself because that would suck
wow did it although i had to do that with recursion to the own function because the only way to know when the connection failed is thru catching the exception:
code(in C#):
Hmm, it looks different than the regular connection objs we use in .NET . Why don't you use SQL or OLEDB objs . They have more options like (timeout , connectionstate, ... etc ) , they return wheather the conntions is successful or failed?